Hi All, I have an old (2004) Intel based server with 4G of ram running Linux ndgonline.net 2.6.18-92.1.22.el5 #1 SMP Tue Dec 16 12:03:43 EST 2008 i686 i686 i386 GNU/Linux fully up to date using centOS rpms for apache, php, and mysql. I have just changed from dmraid to md raid for the OS on mirrored 80Gb SATA drives. (long story for another time) Mysql lives on a Intel hardware raid 5 controlled array - as is has for four years. My application has not changed and also runs just fine on another server (although this one is 64 bit) that has a mirrored mysql database replication from this one. I have compared apache conf files, my.cnf and all appears well. The page that times out on our firefox browsers after 30 seconds does have a series of complex mysql queries. There are no log messages other than ssl_error_log that shows: PHP Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/htdocs/ndg/includes/customHandler.inc on line 87 the line number varies as does the file name it reports. It will serve pages that only have a few records, yet on my functioning server even the large pages return over the internet in less than 2 seconds. So I'm thinking not enough memory? - but it was working well last Monday. something slowing mysql?? - all other queries in this app appear just fine php having issues? How do I get some extra log info to track this down?
Kind regards Rob
Rob Kampen wrote:
How do I get some extra log info to track this down?
Have you tried to run 'show full processlist' on mysql while the query is running? It should show all active queries, what they are doing and how long they have been running for.
Also enable slow query logging and logging when not using indexes, add to /etc/my.cnf and restart mysql:
example: log-slow-queries = /var/lib/mysql_logs/slowqueries.log log-queries-not-using-indexes long_query_time = 3
nate
Rob Kampen wrote:
nate wrote:
Rob Kampen wrote:
How do I get some extra log info to track this down?
Have you tried to run 'show full processlist' on mysql while the query is running? It should show all active queries, what they are doing and how long they have been running for.
Also enable slow query logging and logging when not using indexes, add to /etc/my.cnf and restart mysql:
example: log-slow-queries = /var/lib/mysql_logs/slowqueries.log log-queries-not-using-indexes long_query_time = 3
nate
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Have entered those into the my.cnf file, restarted mysqld and monitored the file - no entries forthcoming with the faulty page request. looking at show full processlist, I see the start of a new process, then almost immediately it goes to sleep and then just sits there.... Thanks for these items Nate - look useful for the future. I think I need to look in the php direction.... Rob
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Found the issue - in the php we are doing a strtotime() call and we did not have the date.timezone setup, thus for every call to this function it was calling the error reporting code and dumping all the stack trace data, thus using up 30 seconds and timing out. Thanks all for your comments and help Rob
on 1-21-2009 7:14 AM Rob Kampen spake the following:
Hi All, I have an old (2004) Intel based server with 4G of ram running Linux ndgonline.net 2.6.18-92.1.22.el5 #1 SMP Tue Dec 16 12:03:43 EST 2008 i686 i686 i386 GNU/Linux fully up to date using centOS rpms for apache, php, and mysql. I have just changed from dmraid to md raid for the OS on mirrored 80Gb SATA drives. (long story for another time) Mysql lives on a Intel hardware raid 5 controlled array - as is has for four years. My application has not changed and also runs just fine on another server (although this one is 64 bit) that has a mirrored mysql database replication from this one. I have compared apache conf files, my.cnf and all appears well. The page that times out on our firefox browsers after 30 seconds does have a series of complex mysql queries. There are no log messages other than ssl_error_log that shows: PHP Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/htdocs/ndg/includes/customHandler.inc on line 87 the line number varies as does the file name it reports. It will serve pages that only have a few records, yet on my functioning server even the large pages return over the internet in less than 2 seconds. So I'm thinking not enough memory? - but it was working well last Monday. something slowing mysql?? - all other queries in this app appear just fine php having issues? How do I get some extra log info to track this down?
Did you do the obvious and check for table or index corruption?