473,324 Members | 2,313 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,324 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 2091
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.