Saturday, March 19, 2016

max_execution_time might not be catchable?

Testing on a GoDaddy account, I don't see a way to catch error max_execution_time allowed. All the error logs are empty, internal error 500 returned, register_shutdown_function is ignored (runtime exits before that function gets called? )

GoDaddy, various troubles with max_execution_time and long running scripts:


https://jumblecat.com/post/2432


https://www.zen-cart.com/showthread.php?110621-500-Internal-Server-Error-FastCGI-incomplete-headers-(0-bytes)-received-from-server/page2


https://wordpress.org/support/topic/500-internal-server-error-on-godaddy-1


http://stackoverflow.com/questions/21926795/how-to-create-php-ini-file-in-godaddy

This seems to be a classical issue with cloud providers. They can terminate your script any time they want. This requires a better strategic approach to overcome......

Algorithm changes, error detection changes, and so on (since the main error log is not available and the standard error log is empty)!

Sample approach in case of a large video file upload on a shared hosting:

Incremental creation of a large video file, by separate, sequential processes piece by piece, instead of a large bulky single process creation from file chunks. Tested on GoDaddy server , and works :)


UPDATE:
GoDaddy seems to be dropping long TCP connections. ERR_CONNECTION_RESET occurs even with the chunked file approach. Probably because the TCP connection is shared among the HTTP requests.....


NEW UPDATE:

Two giant changes:

->First, if you use non-native version of PHP, it does not seem to issue ERR_CONNECTION_RESET. This could be due to the fact that in this case the system really respects the max_execution_time and other params, which are set in PHP options in CPANEL!!!!!

No comments:

Post a Comment

Ubuntu 12.04, 14.04, 16.04 - auto start an app or script before login

To run a command or application at startup, even before the user has logged in, you can use this file: /etc/rc.local The commands entered...