I'm having an issue in WordPress where PHP is dying. I've increased memory, but the PHP process jumps to 100% CPU usage then dies and Apache throws a 500 error.
I've tried to get Apache to log something, or PHP/MySQL to log an error but nothing is logged other then a general 500 error.
The 500 issue is on the list page e.g.:
We currently have over 1200 artist entries in WordPress, if I append a date sort like this:
Then the list loads up fine, fast even! I have sat and watched the MySQL query log and it appears that WordPress is loading up the meta data for every single post (all 1200 of them) in order to produce the list of 10 or so. For just one of the queries, that's returning 92000 rows. I'm using Advanced Custom Fields and a template with its own framework, so each post has a fair chunk of meta data attached. I'm thinking that this is too much data for PHP to process and I'm hitting a ceiling here. The 1200 posts is likely to double easily over the next year.
How can I either force the initial page load to append the date sort or fix the issue with loading up all that meta data?