I seem to have a problem with my site, that sometimes even causes it to crash on post update.
I'm not sure what the problem can be, but I've eliminated a lot of potential issues.
1. The scripts leave no hanging/sleeping MySQL threads
2. All plugins that are working do not seem to be outputting any errors to any of the log files
3. I've began minimising the individual calls to get_permalink(); to keep server processes low.
4. Any plugins that we're serving no purpose have been disabled and removed
5. I've disabled Post revisions with: define('WP_POST_REVISIONS', false);
6. I've updates the max_allowed_packet size in MySQL as well as in Wordpress: define('WP_MEMORY_LIMIT', '32M');
I have a few more avenues of inquiry I want to check out:
1. The database has previously been saving post revisions, but the database is only 14MB - I assume this is fine?
2. I've added a script to output the number of queries ran per page and it seems to be around 30 - is this ok?
The real issues are on post edits, and post creations. If I add a new page it usually forces my server to reboot as it tops out all resources. The only remedy is to reboot the dedicated server.
It has a high enough spec to in theory run hundreds of these websites, it's only receiving 1600 pageviews per day!!
The process that uses most of the cpu is index.php so I have to assume it's either a plugin or a template file that's causing the problem,
1. How can I find out what file it is?
2. Are the two issues related? The high index.php on page load, and the crashing on writing to the DB?
Any help would be much appreciated