I'm having a TERRIBLE problem in a dedicated server that's used as a Mobile App backend which has less than 1000 downloads.

There's a script (which is run multiple times a day) that hangs for a long time. I'm sure that it's because I'm Guzzling my own server with it's domain name and not a loopback address. Nevertheless this causes that when there's a very small amount of concurrent users, the server hangs forever until I restart Apache. This is of course not a hardware limitation issue since the user base is very small for a dedicated server.

Until I find the root cause of the problem, I need this to stop happening ASAP, so I must KILL any PHP Script that lasts longer than say 5/15 secs. The script must be killed immediately after that time elapses, otherwise this is going to keep happening and my client is already quite furious about this.

Kind regards, Joaquin.

1 Answer 1


In your php.ini file (probably /etc/php/<version>/fpm/php.ini) you want to change the max_execution_time setting:

max_execution_time = 5

Then re-start php-fpm and the web server.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .