504 Error On Server
Asked Answered
R

1

8

I'm loading data into a text file and when the procedure takes long (lots of data) I get a 504 response (viewed in Fiddler) and obviously the file fails to generate. I thought I'd try increasing the session timeout in my web.config, but that didn't help.

Is there some property that determines the timeout for this?

Appreciate any help.

Rizal answered 11/6, 2012 at 19:1 Comment(2)
You doing this from a webservice? Pulling the file or pushing ? Have you tried writing the file with a smaller data set to see if it's the size or permissions ?Litre
The default timeout of web application is 90 seconds which is more than enough for general purpose use. Then too if you want to increase the timeout time for a request. =>Firstly, you need to increase the timeout of the executionTimeout attribute of the httpRuntime element. <httpRuntime executionTimeout="36000" =>And moreover, this attribute takes effect only when you set the debug attribute of the Compilation element to false. <compilation debug="false" ../> =>But this works in conjunction with the Session timeout. <sessionState mode="InProc" timeout="360" ... />Pietism
P
5

This is most likely related to httpRuntime web.config element:

<httpRuntime
   maxRequestLength= "4096"     />

maxRequestLength is in integer value that specifies the limit for the input stream in KB. The default is 4096 (4 MB) set to this level with the intention to avoid users posting large files to the server.

Additionally you may need to add the executionTimeout="999999" attribute to this element.

Please note that Microsoft documentation indicates about debugging mode regarding the executionTimeout:

executionTimeout The default is "00:01:50" (110 seconds).

This time-out applies only if the debug attribute in the compilation element is False. To help to prevent shutting down the application while you are debugging, do not set this time-out to a large value.

Psychoneurosis answered 6/1, 2014 at 15:17 Comment(2)
executionTimeout value is in seconds, default value = 110.Gannon
I am beginner, can you kindly provide steps to increase the execution timeout in IIS Server. Like how to open the IIS Server settings and change the timout time.Kristykristyn

© 2022 - 2024 — McMap. All rights reserved.