Page 1 of 1

High CPU use + Random timeouts

PostPosted: 13. January 2012 21:30
by akensai
Hey guys,

Having a bit of an issue that I just cannot seem to figure out on my own.

ISSUE:
Random Timeouts (seems like php/mysql) when modifying sql related fields, aka, wordpress posts, etc.
High CPU load per client, one person connects and CPU spikes 10% for a good 1-2s

SERVER STATS:
Dual 2.8ghz
4gb RAM
Windows Server 2008
75mbit up/down
http://akensai.com/network/

Configurations:
php.ini - http://akensai.com/xampp-conf/php.ini
httpd.conf - http://akensai.com/xampp-conf/httpd.conf
httpd-default.conf - http://akensai.com/xampp-conf/httpd-default.conf
httpd-mpm.conf - http://akensai.com/xampp-conf/httpd-mpm.conf
mysql/my.ini - http://akensai.com/xampp-conf/my(1).ini
mysql/bin/my.ini - http://akensai.com/xampp-conf/my(2).ini

Any feedback is highly appreciated.

There are generally anywhere from 10-30 people browsing globally at all times. Spikes to up to 250 per second at peak hours, and when ThisIsFanatical posts a new track.

Re: High CPU use + Random timeouts

PostPosted: 13. January 2012 21:32
by akensai
Also, please note that "Win32DisableAcceptEx" is at the bottom of httpd.conf, it was placed there due to a thread I read here suggesting it.

Another note:
The configurations will be deleted from that directory in the next few days, not exactly something I want to leave there for an extended period of time.

Re: High CPU use + Random timeouts

PostPosted: 14. January 2012 00:38
by Sharley
The Win32DisableAcceptEx setting is now configured in the \xampp\apache\conf\extra\httpd-mpm.conf file in the only relevant section for Windows near the end of the file not in the httpd.conf file.
The conf files in the Extra folder are read and actioned after the httpd.conf file and will override any settings found in that file.

XAMPP for Windows is configured for development use at localhost only, not for use as a production server and this support forum usually only supports that development environment use.

The default XAMPP settings are therefore mainly for that development purpose.

If you scan through the httpd-*.conf files you may find some performance settings that may be related to your issue that you can experiment with.

Also in the \xampp\mysql folder are some sample my*.ini files that may suit your purpose better - just to add the only my.ini file that is read by MySQL is that contained in the \xampp\mysql\bin folder

So if you experiment with those alternate my.ini files then you would need to rename the original my.ini file in the bin folder, also renaming the alternate ini file to be copied to the bin folder as the replacement my.ini file - restart MySQL and Apache if you change any ini or conf settings.

I also suggest you remove the links to your configuration files as they are not needed for the purposes of troubleshooting your issue.

I have found that Google searching showed some useful results re performance of Apache and MySQL in a production environment.

You could also use a more robust free production server by using the Zend Community Edition web server, which is also more secure than the development environment only XAMPP suite.

Good luck. :)

Re: High CPU use + Random timeouts

PostPosted: 14. January 2012 02:19
by akensai
Sharley wrote:The Win32DisableAcceptEx setting is now configured in the \xampp\apache\conf\extra\httpd-mpm.conf file in the only relevant section for Windows near the end of the file not in the httpd.conf file.
The conf files in the Extra folder are read and actioned after the httpd.conf file and will override any settings found in that file.

XAMPP for Windows is configured for development use at localhost only, not for use as a production server and this support forum usually only supports that development environment use.

The default XAMPP settings are therefore mainly for that development purpose.

If you scan through the httpd-*.conf files you may find some performance settings that may be related to your issue that you can experiment with.

Also in the \xampp\mysql folder are some sample my*.ini files that may suit your purpose better - just to add the only my.ini file that is read by MySQL is that contained in the \xampp\mysql\bin folder

So if you experiment with those alternate my.ini files then you would need to rename the original my.ini file in the bin folder, also renaming the alternate ini file to be copied to the bin folder as the replacement my.ini file - restart MySQL and Apache if you change any ini or conf settings.

I also suggest you remove the links to your configuration files as they are not needed for the purposes of troubleshooting your issue.

I have found that Google searching showed some useful results re performance of Apache and MySQL in a production environment.

You could also use a more robust free production server by using the Zend Community Edition web server, which is also more secure than the development environment only XAMPP suite.

Good luck. :)


I have secured it for production use, in fact it's been running basically fine over the span of the past month at high useage. Really what I need help with is setting the correct settings in confs to fix some timeout issues.

Re: High CPU use + Random timeouts

PostPosted: 14. January 2012 04:28
by Sharley
Perhaps these Apache Friends Advanced Forum Search Results may hold some pointers.