Timeout while executing database query



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

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.



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


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)

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


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


How can we change the command timeout with the Invoke Method ?


I will send you the xaml file


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


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

closed #12