toxicious Posted January 19, 2013 Posted January 19, 2013 Account name:gaddons Domain:gaddons.tk Been getting 500 error for the last hour again. I'm quite sure that I've reached my max processes limit again. I've been looking over my code multiple times but I have no idea what is causing the files (PHP) to run forever.I have no infinite loops. Last time it was the index.php and shoutbox.php that was running. The shoutbox.php is an easy one to debug, though as I mentioned I didn't find anything that could cause it. It performs some queries against the database, could it be that the db is making it take forever or something? The index.php is a hard nut to crack, since my website is built to be very modular. More or less all requests go through index.php (except API for example) which in turn includes the right files and so on. Is it possible to get anymore information regarding what is currently running except what file is executing? Line number would be awesome I guess, but what URL was requested and so on would also help me in solving this problem. EDIT:Found this info:http://php.net/manual/en/function.set-time-limit.phpIf my scripts are executing forever and taking up processes, that must mean you don't have a "max_execution_time" defined in your php.ini, right?Not that I would understand why you wouldn't have it, but in case you don't want to add it, I guess I could use the set_time_limit as a temp-fix.Waiting for reply first though.
Shinryuu Posted January 19, 2013 Posted January 19, 2013 Yeah, we have a max time, but it's probably good to limit it within your own source to avoid hour+ wait times while the rogue php processes are killed. EDIT: Seems your site is working now by the way.
toxicious Posted January 19, 2013 Author Posted January 19, 2013 Yeah great that it got out of whatever problem it had.Gonna set a max time of like a minute or something. At a max, it shouldn't take more than a couple of seconds but its better to be safe than sorry.
Recommended Posts