Set transaction status : The operation has timed out - Troubleshoot Steps / Solution

Timeout During Set Transaction status

Reason of such Issues:
Usually Robot is not able to retrieve the required data on time i.e 30 sec which is a default timeout.

Solution 1 :

  1. Kindly increase the TimeoutMS property of the activity.
  2. Place the activity inside " Retry Scope " activity.

Solution 2:
EventViewer error: In case if in eventviewer you see exception related to : System.Data.SqlClient.SqlException: Execution Timeout Expired


verify the count of records of the below from Sql Server:
select count(*) from [dbo].[Notifications] ;
select count(*) from [dbo].[TenantNotifications] ;
select count (*) from [dbo].[UserNotifications] ;
select count (*) from [dbo].[Logs] ;
select count(*) from [dbo].[AuditLogs];

Solution: Follow the solution if record count is more than 2 million for any of the table
SQL performance issue is maxed out due to logging.
None of the above-mentioned tables should have more than 2 million records

Please use this KB to eliminate the debug logs and then shrunk the database files .
The query is also inside the below link :

Each & every step is detailed in the above link. It’s recommended to have max 1 million records to be on the safer side and maximum to 2 million.

Take the backup of all the previously mentioned table & clear the information.

It’s also advised to perform a database maintenance biweekly or Monthly, which purely depends on the information getting logged to the database.

Query to Fetch all records older than 15 days
SELECT * from [dbo].[Logs] where
DateDiff(day, TimeStamp, GetDate()) > 15

Query to Delete all records older than 15 days
DELETE FROM [UiPath].[dbo].[Logs] where
DateDiff(day, TimeStamp, GetDate()) > 15

Also, for more information on logs please refer the below link:


This will solve the issue.

Disclaimer: The above solution may fix the issue.


Hi in my case the timeout was couse by recycling application pool in IIS, I had to change scheduler and set it to run recycling while no process is running. Hope it will help solve problem to other :slight_smile: