Timeout while executing database query

database

#1

I am executing a Query on a MySql server, using the Execute Query activity. The Query is expected to take up to a minute. Every other time, the Query is failing due to a timeout on the connection, with the following message:

Could not kill query, aborting connection. Exception was Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Execute query : Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

How do I go about increasing the timeout period?


Change Database Query Timeout
#2

We will investigate if it’s possible to configure the Timeout in the Database communication API.
As for now, this is, indeed a limitation in Database activities. Maximum is 30 secs.


#3

Hello!

You just have to add ;Connect Timeout=5000 on the Connection String. The Timeout must be in Milliseconds.

Regards!


How can we increase SQL connecton time in uipath?
Command Timeout in Execute Query/Non Query activity
SQL Command Timeout
Bot Time Out Error(Execute Query)
#4

I’ve added the time out command as follows:

“Data Source=Server;Initial Catalog=Database;Integrated Security=True ;Connect Timeout=1800000”

But I still get the time out after 30sec. Is the connection string above correct?

I want to add a time out of around 30min as the query I need to do takes on average 17 when run from the MSSQL Studio


#5

Hi You can add timeout by using invoke method not necessary to add time out in connection string


#6

Hello,
How can we change the command timeout with the Invoke Method ?
Thanks


#7

I will send you the xaml file


#8

Hi PFA of command timeout xaml filecommandtimeout.xaml (5.9 KB)


#11

This only changes the timeout for connecting to the database, not the timeout for executing a command or query once connected to the database.


#12