473,395 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Timeout exceptions during execution of stored procedures

I have windows service running on win2000 and client applications on
local network connected to service via remoting.
Service acts as interface to MSSQL 2000 database and it uses Microsoft
Data Application Block.
Every few days data block throws timeout exception during the insert
(and very rarely even during select). After that every subsequent
insert from any client, even from client residig on the same machine
as service, throws the same exeption.

There is no database activity on the server, CPU usage is cca 5%, and
it seems like nothing is going on. Database is small and there is
plenty of disk space (SCSI discs).

I tried to restart service, it didn't help. Problem persists for hour
or two, than simply disappeares, so system continue to work as it
nothing happened.

During one of these blocks I used query analyzer to insert some data
into database "manually". I run insert SQL statement and it succeeeded
after 45 seconds. Magically, after that successful insert, system
recovered and all clients continued to work correctly.

I increased timeout from 30 secs to 60, but I only succeeded to
increase working periods. Strange timeouts now popup cca once in a
weak.
Of course, insert cmd from query analyzer finish after more than 60
secs and that somehow fix the problem.

Does anyone have some hint what's going on? It is veeery hard for me
to reproduce the problem. Should I increase timeout to 120 secs? 500
secs?
It is hard to explain to users that, from time to time, they should
wait 5 minutes for some simple insert statement to complete.

Thanx
Jul 21 '05 #1
1 2099
There are two timeouts to deal with in ADO.NET. The first is the connection
timeout; the second is the command timeout. Both need to be set if you have
activity that will take you beyond the timeout value of either.

If you find that simple queries are taking too long, you may need to look at
indexing strategy on the table, along with other factors (triggers, etc.).

If you can watch the system (SQL profiler) until it bombs, you will get a
better idea of what is happening at the time. Perhaps you will find some code
with an exclusive lock on a select, etc.

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************

"to*********@mireo.hr" wrote:
I have windows service running on win2000 and client applications on
local network connected to service via remoting.
Service acts as interface to MSSQL 2000 database and it uses Microsoft
Data Application Block.
Every few days data block throws timeout exception during the insert
(and very rarely even during select). After that every subsequent
insert from any client, even from client residig on the same machine
as service, throws the same exeption.

There is no database activity on the server, CPU usage is cca 5%, and
it seems like nothing is going on. Database is small and there is
plenty of disk space (SCSI discs).

I tried to restart service, it didn't help. Problem persists for hour
or two, than simply disappeares, so system continue to work as it
nothing happened.

During one of these blocks I used query analyzer to insert some data
into database "manually". I run insert SQL statement and it succeeeded
after 45 seconds. Magically, after that successful insert, system
recovered and all clients continued to work correctly.

I increased timeout from 30 secs to 60, but I only succeeded to
increase working periods. Strange timeouts now popup cca once in a
weak.
Of course, insert cmd from query analyzer finish after more than 60
secs and that somehow fix the problem.

Does anyone have some hint what's going on? It is veeery hard for me
to reproduce the problem. Should I increase timeout to 120 secs? 500
secs?
It is hard to explain to users that, from time to time, they should
wait 5 minutes for some simple insert statement to complete.

Thanx

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: heruti | last post by:
Hi all... I've been stumped by this for days. Bit of ASP code: (IIS) Set LocalConn = CreateObject("ADODB.Connection") LocalConn.CursorLocation = adUseClient LocalConn.CommandTimeout = 0...
1
by: levtoma | last post by:
Hello, We have an ADO.NET application using .NET version 1.1.4322 SP1. It is calling stored procedures in a database that it never written to. The only thing the stored procedures do is a...
4
by: Paul | last post by:
I sometimes get a timeout error when populating my datagrid, the code is WizardConnection.Open() UpdateCommand.CommandText = "EXECUTE sp_assign_user '" & PhysOffice.SelectedValue & "', '" &...
5
by: Jason | last post by:
Hi all I get the following error when executing a rather intense stored procedure from an ASPX page. I have tried: - Increasing timeouts on IIS 5.0 (all areas that even mention timeout) - use...
10
by: greenb | last post by:
Our asp.net web app uses a .NET component (DLL) in the bin directory to call several stored procedures back to back to perform updates. They don't return any data. Sometimes the total execution...
3
by: Nils Magnus Englund | last post by:
Hi, I've made a HttpModule which deals with user authentication. On the first request in a users session, it fetches data from a SQL Server using the following code: using (SqlConnection...
1
by: tonci.tomic | last post by:
I have windows service running on win2000 and client applications on local network connected to service via remoting. Service acts as interface to MSSQL 2000 database and it uses Microsoft Data...
1
by: Ron | last post by:
Hi, I had a stored procedure on SQL 2000 server to run calculation with large amount of data. When I called this stored procedure via System.Data.SqlClient.SqlCommand on production, i got error...
1
by: Scorpion657 | last post by:
Hey I really need help. I have a Website coded using ASP.NET and VB and for some reason, i'm getting the following error when I try to upload or access a large file which is stored in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.