Click here to Skip to main content
13,143,774 members (29,085 online)
Rate this:
Please Sign up or sign in to vote.

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
Mehdi Gholam 23-Sep-11 7:48am
It seems you might have locking issues? Post your exception details.
CodeHelper_PS 23-Sep-11 7:49am
increase maxrequestlength in httpruntime tag in web.config file
and then try once again
Rate this: bad
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.
Rate this: bad
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

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170915.1 | Last Updated 6 Feb 2014
Copyright © CodeProject, 1999-2017
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