Jump to content

Recommended Posts

Posted

Hi,

when I run a PHP script which could last up to 5 minutes, making so many times PGSql DB calls, it gives me "500 Internal Server Error" after a while (30sec/1minute) and stops running :

 

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@XXX.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

No error logstracked.

Is there maybe a limit on PHP script duration?

I would otherwise need 10 cronjob slots instead of only 2 : how can I get them, please? Each would run a single atomic PHP script as a part of the bigger one which now gives me an error..may I ?

 

Please let me know.

Thank you.

Posted

A script needing those kinds of resources or run times is almost certainly too heavy be hosted here. The server error is because php has an execution time limit on it. If php didn't exit on you and give the server error, you'd probably end up suspended for load instead.

 

You can use a tool like setcronjob.com to set more than 2 crons, and you'll need to limit the php runtime to 30 seconds or it will just exit on you and make apache spit out a 500.

 

I'd recommend setting those 10 crons to run over the course of a day or two to help with load (e.g. do one step of your 10 every 4 hours). Running it all at once could get you suspended if its really that heavy that it needs this kind of time to run.

  • 2 months later...
Posted

Sorry for necro-posting this thread but I usually get this error when I login to my cPanel. Is there any reason why this happens, or is there a limit to connections on the server?

Posted

500 errors when using cpanel are normal due to the process limit. Accounts are limite in how many processes they can run, and cpanel opens a lot of them when you log in. As a result, apache can't open php to run your site, and spits out that error.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...