I have SP webpart for importing budget items in SP List. For some 4000 items it took about 3-4 minutes (it do some custom checking, parsing and importing) to import that (on my dev pc). But if I start that import on my production test server he start to import, it manage to import about 2000 items in list(in about 2 minutes), and than unexpected exception occur. Log say

"System.Web.HttpException: Request timed out."

I looked into IIS to compare setting(app pool,web application) between my pc and server. They are same. Then I looked in web.config to check executiontimeout. Web.config said:

  <httpRuntime maxRequestLength="2097151" executionTimeout="3600" />

which should be more than enough (2GB, and 60 minutes). Please any suggestion why webpart goes to timeout, when he is able to connect to SP, to read input files, to insert half of records in list?

  • upload file partially, not all 2GB per request. For example make 200 requests by 100 mb upload – gdbdable Mar 13 '15 at 11:11

There is a web.config in the Layouts folder in the SharePoint Root, change the timeout on this if you need to, too.

Also: This seems to be a great help when debugging, saves you from rushing in a panic to step through code before the worker process bails on you.

  • This is answer. I changed connection timeout as Tobi said but this didn't helped. Then I modify web.config from Layouts, in the way that I increased timeout value, and defined maxrequest value which wasn't specified. Despite that, I do code refactoring (putted dictionary instead foreach loop). Now everything is much faster, but thanx anyway! – trip Feb 2 '11 at 8:10
  • Whoa, this is old. For future readers: to avoid the "Panic before w3wp bails", go to IIS, find your App Pool, and set "Ping Enabled" to False - this will prevent timing out when debugging. – James Love Sep 26 '14 at 7:38

Check the settings for Request timeout in IIS:

IIS Manager -> Properties of Web Site -> Tab Web Site -> Connection timeout

There are multiple configurations where you can set the timeout and this is just one of them.

  • As it seems for now all relevant setting related to IIS, on my pc and server are same. I even increase few numbers on server but with no help. – trip Jan 31 '11 at 15:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.