Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Insight import from database - Query timeout?

Mariano Redondo
Contributor
January 28, 2022

I have configured an import on Insight against a MySQL database, with an object mapping that works perfectly.

Now I need to add a new object mapping against another table of the same database, this time a bigger table (+7k records). But when trying to save the object type mapping I got an error "Could not query database with specified selector", where the selector is a simple "select * from <table>"

It seems to be a data volume issue, because if a modify the query to retrieve only one record (select * from <table> where id = xx) it works.

Does anyone know how could I fix it?

Regards. 

 

 

    

1 answer

1 accepted

0 votes
Answer accepted
PD Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 29, 2022

7k record in a single table is nothing for a correctly configuraed mysql db.

In one of my dbs, I have almost 9k records and amlmost 100 columns

I can retreive all the data in under 1 second.

There has to be something else wrong either with your connection to the server or the data structure. Maybe you have large columns. Blobs or varchar(max)

Try to exclude those.

If all else fails, and you need to increase the timeout, you can add parameters to your JDBC URL. E.g: 

?connectTimeout=5000&socketTimeout=30000&sessionVariables=MAX_EXECUTION_TIME=30000
Mariano Redondo
Contributor
January 31, 2022

Hi Peter. Forgot to mention in the post that I had tried with connectionTimeout and socketTimeout variables on the url (and didn´t work), but not sessionVariables.

Using as you indicated worked perfectly, many thanks!

Suggest an answer

Log in or Sign up to answer