• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

php script hangs server

C

codesmith

Guest
Hello,

This isn't directly a Plesk question but since y'all are my favorite *nix support team.... :)

While developing PHP scripts occasionally a script will go out of control, endless loop, etc. This is bringing our server to it's knees - loads of 45 or higher, sometime necessitating a manual reboot. Is there anything that can be done to 'throttle' apache so it times these out or not so much processing time goes to this?

Thanks....
 
There was a thread at WHT which dealt with a similar problem.

Not sure if one of those suggestions will help you.
 
two possible reasons:
1. php bug.
2. flaw in the script

but regarding reason 2, i think php would disable the script after a certain amout of time leading me to think reason 1 is the problem.

upgrade to the latest version of php...
if that doesn't help, or you already have the latest, then submit a bug report.

perhaps this will help you knock down the dam instead of trying to pump the water over it...
 
Hmm I let this go and now I'm back at it. An endless loop on a PHP script definitely jumps the load on the server way high and I pretty much have to restart Apache to stop it.

We have
max_execution_time=90
and memory_limit=32M

to handle larger file uploads and Gallery stuff (thumbnail processing).

I don't know why the max_execution_time is being ignored - the scrips go on forever. We are running safe_mode off but the script itself isn't overriding that. Apache Timeout is set to 300 seconds but can't tell if it should timeout something like this.

Any other idears?
 
Oh yea, it is a very old post. But my question fit in here.

I wrote a php script for scrap a website and save some data to a file. Unfortunately i get a 504 Gateway-Timeout. That's not the problem, but i saw that the file will bigger and bigger. That means that the script was still running.

Did I miss something in the Plesk settings or is it on purpose? I always thought apache also terminated php handlers.
 
Back
Top