Developer forum

Forum » Integration » Command timeout on Run SQL Add-in

Command timeout on Run SQL Add-in

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

Can you add a CommandTimeout (int, default value 30) parameter to RunSqlScheduledTaskAddIn and use it when executing the command:

int rowCount = Database.ExecuteNonQuery(SqlQuery, CommandTimeout);

The current value is 30 seconds with no option to override. I have some complex delete logic to run against a large dataset and my command keeps timimg out.

Thanks!

Imar


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply
This post has been marked as an answer

Hi Imar,
yes, that can be implemented. As a workaround it is possible to increase the default database command timeout using the global setting option "/Globalsettings/System/Database/CommandTimeout", max allowed value is 240 seconds.
BR, Dmitrij

Votes for this answer: 1
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Thanks Dmitrij. I need to delete about 4 million records in batches, so 240 seconds may not be enough. I just created my own RunSqlAddInTask with a timeout as a package and that's working well.

Imar

 

You must be logged in to post in the forum