Monday, July 27, 2015

Upload timeout issue

This is a repeated scenario.

Now I'm trying to be as thorough as possible in fixing this.

In PHP, this can be related to the following parameters in php.ini (often /etc/php.ini):

max_execution_time = 60  ; seconds
max_input_time = 60         ; seconds
memory_limit = 512M        ; 0.5 GB
post_max_size = 1000M    ; 1 GB
upload_max_filesize = 1000M   ; 1 GB


If the upload is done through a SOAP client [1], then this parameter in php.ini also should be updated:

default_socket_timeout = 60 ; seconds

After this, apache web server needs restart. (e.g., on redhat, sudo /sbin/service httpd restart)


On windows, ASP.NET application, these parameters in web.config needs update [2]:

In system.web (maxRequestLength is in KB):
<httpRuntime maxRequestLength="1048576" executionTimeout="3600" />

And in system.webServer (maxAllowedContentLength is in bytes) (this is needed in IIS7 and later): 
<system.webServer>
  
<security>
     
<requestFiltering>
        
<requestLimits maxAllowedContentLength="1073741824" />
     
</requestFiltering>
  
</security>
</system.webServer>


References:
[1] http://stackoverflow.com/questions/9403486/error-fetching-http-headers-in-soapclient
[2] http://stackoverflow.com/questions/3853767/maximum-request-length-exceeded



No comments:

Blog Archive

Followers