NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Database logging timeout

I am using the batch process model to remotely execute 12 tests simultaneously on 12 individual computers. When each thread finishes its test and all the threads are logging to the database I will sometimes get an error. The threads will get partially through logging data to the database then I will get an error that the SQL Server Timeout has expired. Is there a way to fix this, or a way to lengthen the timeout?

I have attached a bitmap that shows the exact error message I am receiving.
0 Kudos
Message 1 of 3
(3,266 Views)
Monson -

Looking at Microsoft MSDB, I found the following:

ODBC error text
[Microsoft][ODBC SQL Server Driver]Timeout expired.

Explanation
The timeout can occur when you're updating the
database with any Transact-SQL changes.


The TestStand logging feature does not offer any way to configure the timeouts for command objects that it executes, and it does not set any specific limit for this. The ADO Command object has a CommandTimeout property that indicates, in seconds, how long to wait for a command to execute. The default is 30.

Do you know if your statement is taking longer than 30 seconds to execute when it fails?

Do you know if the server that you are writing to is slow in some way or has a lot of users which may prevent y
our updates from occurring quickly?

Scott Richardson (NI)
Scott Richardson
https://testeract.com
0 Kudos
Message 2 of 3
(3,266 Views)
If you have a lot of records in the database and you are using SELECT statements instead of INSERT, you may consider trying to alter the statement to something like:

"SELECT TOP 0 * FROM STEP_RESULT"

This returns no records and allows you to still insert records.

In general parameterized INSERT statements are more efficient than SELECT statements.

Scott Richardson (NI)
Scott Richardson
https://testeract.com
0 Kudos
Message 3 of 3
(3,266 Views)