ExecuteNonQuery timeout

G

Guest

We have an application that runs fine for 2-3 days, then suddenly begins
erroring out. This may continue for several hours/days until a job runs on
the database being accessed, then begins running normally again. The time &
number of executions before failure appear to be random, but the resumption
is consistent with the execution of the job.

The application feeds an XML string to a stored procedure in the database to
insert a number of records. There are typically 25-50 records in each string
when it begins erroring. (During heavy use, there can be approx. 500 records,
which process in < 1 sec.) The stored procedure is run by the .NET app. every
10 seconds. When an error occurs, the XML is written to a file. On the next
cycle, the app. attempts to read the file and send it to the database using
the same stored procedure. If the app. is erroring, the file can't be sent to
the DB, but on resumption, the file is inserted fine.


The exception trace is:

02/25/05 02:57:21:912 - Error in LogWriter._WriteNewLogToDB
Could not write log to database.
System.ApplicationException:
MHCommon.Int32 ExecuteActionQuery()
SQL Server Error occurred executing the action query XMLBulkInsert.at HamptonTilley.MHDataConnector.ExecuteActionQuery()
at HamptonTilley.LogWriter._WriteNewLogToDB(String LogData)

**Inner Exception**
SQLException:
Provider: .Net SqlClient Data Provider, Server: , Error Level: 10, Error
State: 0, Error Number: -2, Error Message: Timeout expired. The timeout
period elapsed prior to completion of the operation or the server is not
responding., Procedure: ConnectionRead (WrapperRead())., Line Number: 0


List of SQL Errors associated with this Exception.
..Net SqlClient Data Provider, Server: , Error Level: 10, Error State: 0,
Error Number: -2, Error Message: Timeout expired. The timeout period
elapsed prior to completion of the operation or the server is not
responding., Procedure: ConnectionRead (WrapperRead())., Line Number: 0at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at HamptonTilley.MHDataConnector.ExecuteActionQuery()


We are running SQL 2000 SP3 on Windows 2000 server. MDAC is version 2.7 SP1.
We are using .NET 1.1. A SqlConnection object is used for the connection,
SqlCommand for the stored procedures with a SqlDataAdapter. Pooling is False
(an attempt to fix the problem described in a "General Network Error" KB
article).

Please let me know if you have any further questions.

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top