Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL2000 VS2005 C# SQL-Server , +
Hi,
 
I have dot net application which update several table in my database for a single functionality Example (pass file).
 
One button "pass file" is there when I click it do many DML and sql query.
For first few click it will work successfully, but after some times it show below message.
 
Error Occured: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
The statement has been terminated.

 
I have tried by increase timeout and make it zero also. Still not able to solve the issue.
 
Please suggest me how i can resolve this issue.
 
Thanks and Regards
Asutosha Sarangi
Posted 23-Sep-11 1:39am
Asutosha4.1K
Comments
Mehdi Gholam at 23-Sep-11 7:48am
   
It seems you might have locking issues? Post your exception details.
CodeHelper_PS at 23-Sep-11 7:49am
   
increase maxrequestlength in httpruntime tag in web.config file
and then try once again
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Make sure that you are releasing the connection objects in your data access layer.
 
If you are running multiple statements in the stored procedure, then seperate them with 'GO'
 
Also try specifying the timeout in the conenction string. Keep the timeout to 10 or 20 minutes.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Try this in your web.config,
 
<addkey value="server=LocalHost;uid=sa;pwd=;database=DataBaseName;Connect Timeout=200; pooling='true'; Max Pool Size=200" />
 
Alternatively, try to Select Top 50 or less records in your SQL Statement
  Permalink  
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 343
1 _Amy 290
2 Manfred R. Bihy 200
3 Maciej Los 185
4 CHill60 180
0 OriginalGriff 7,445
1 Sergey Alexandrovich Kryukov 6,347
2 Maciej Los 3,799
3 Peter Leow 3,558
4 CHill60 2,702


Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 6 Feb 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100