Hello David.
As you remember we have had a whole group of queries related to speed issues (and in fact the site going down a number of times and the server needing rebooting), but I think we have just found out what is really causing our problems. Hostgator have told us the following:
"It looks like there is a process that is executing but not terminating. {content saved} seems to be running 25 times. Some of those since Jun 8th."
Have you seen this before? What can we do about it?
Thanks,
Mark.
I'm now getting
Warning: Invalid argument supplied for foreach() in /home/server5/public_html/partnersite-cheapest-bargain.co.uk/search.php on line 162
Warning: Cannot modify header information - headers already sent by (output started at /home/server5/public_html/partnersite-cheapest-bargain.co.uk/search.php:162) in /home/server5/public_html/partnersite-cheapest-bargain.co.uk/html/header.php on line 12
Hi Mark,
Could you email me your search.php (as an attachment) and I'll take a look right away for you...
Cheers,
David.
Hi David - I've installed the new code and done the changes but I see that site {link saved} where the database is, is currently giving a 500 error. What should I do next?
Hi Mark,
I notice that it's up and running now - let me know if you still need any help with this...
Cheers,
David.
Hello Mark,
Normally PHP / MySQL are configured to handle this situation gracefully (in this setup it sounds like MySQL is not returning; as when MySQL returns PHP will then return.
However, this can be handled by setting the PHP ignore_user_abort setting at run-time to ON, so that when a browser (or perhaps more likely a web robot) abandons the connection the process will terminate.
To do this, add the following line of code right at the top of includes/common.php (immediately after the opening PHP tag):
ini_set("ignore_user_abort",FALSE);
Cheers,
David.