I am using the following setup:
- CentOS 5.9
- Apache with Nginx proxy for static resources
- PHP 5.4
When uploading smaller files, everything works fine. If however I try to upload larger files (I haven't yet determined the cut off point) I get 500 errors.
My apache logs are set to E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
When this first occurred I checked the logs and saw that the POST was longer than the MaxRequestLen in fcgi config.
I promptly changed this in both my php.conf file and in my post_virtualHost include file from within cPanel. This prevented the error message from getting logged but i still receive the 500 errors, and confusingly, no errors relating to this are getting logged whatsoever.
From the clients point of view the file seems to upload fine and takes a long as it should (with html5 file api reporting the progress correctly throughout) and the 500 error is generated after the server has received the full file during a lengthy script execution afterwards.
The file itself is a large text file containing several base64 images which are then pulled apart server side, converted into actual image files using ImageMajick (via the IMajik php extension) and are then duplicated into several different size versions with varying levels of filtering/compression applied to them. This whole process can take quite some time. Could this be part of the problem? If so how would I fix it?
My fcgi configuration is current as follows:
MaxRequestsPerProcess 1000 FcgidMaxProcesses 200 FcgidProcessLifeTime 7200 MaxProcessCount 500 FcgidIOTimeout 400 FcgidIdleTimeout 600 FcgidIdleScanInterval 90 FcgidBusyTimeout 300 FcgidBusyScanInterval 80 ErrorScanInterval 3 ZombieScanInterval 3 DefaultMinClassProcessCount 0 DefaultMaxClassProcessCount 3 FcgidMaxRequestLen 1073741824
I have tried replacing FcgidMaxRequestLen with the older MaxRequestLen but still no luck.
Any help would be greatly appreciated.