It sounds like you want to optimize your web server and php configurations together to avoid this error.
Which version of apache are you running?
This sounds strikingly similar to an apache 1.3 (large file upload) configuration issue I've learned to avoid over the years. set LimitRequestBody to an int (file size in bytes) value larger than your largest file.
Depending how this is uploaded you'll probably also have to increase the post_max_size to larger than the file you want to upload and of course increase the max_input_time and also max_execution_time beyond the time it takes to upload the file.
Hello,
Thanks for your valuable hints that pointed to the solution.
The site is running Apache 2.2.x , with php on fcgid.
The LimitRequestBody is still relevant at this version
http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestbody
And even after trying the php.ini and apache2 configs explained at
http://www.radinks.com/upload/config.php
the problem persisted.
There is a trick at fcgid configuration, with the proper php.ini and other apache settings too.
http://httpd.apache.org/docs/2.2/mod/core.html#maxkeepaliverequests
http://httpd.apache.org/docs/2.2/mod/core.html#timeout
Tried setting fcgid
ProcessLifeTime 1600
BusyTimeout 1600
to solve the problem for this file size upload at my bandwidth.
Also, the hosting provider machine limits for ram and swap must be respected.
The file is uploaded to memory by apache.
But I am afraid this unusual values settings could open a stability problem for the server under load.
Observing the failure with top, I saw that when ram "almost" depleted (30 MB left), the upload crashed. Disabling some service to free ram changed the duration. So, I guess it is not a time limit anymore, but something related to hosting limit memory. I did not set RLimitMem so it should follow system limit. .
Any suggestions?
Regards. Andre Felipe
---
A Debian user never dies. Issues a last command:
shutdown -h now