Not sure if these two problems are related but let me start with the title problem. Before you downvote for server related Q - if I put this on SE they will say it's wordpress specific due to the nature of errors.

  1. I have recently gone through our server logs and found hundreds of lines of errors referencing. End of script output before headers: usually for index.php but also wp-cron.php , admin-ajax.php and probably more.

    [Tue Feb 16 09:30:38.209846 2016] [core:error] [pid 30282] [client XX.XX.XXX.XXX:XXXXX] End of script output before headers: index.php, referer: https://www.website.co.uk/page/
    [Tue Feb 16 09:45:58.230590 2016] [core:error] [pid 10470] [client XX.XXX.XXX.XXX:XXXXX] End of script output before headers: index.php, referer: https://www.website.co.uk/
    [Tue Feb 16 10:11:42.186165 2016] [core:error] [pid 13733] [client XXX.X.XX.XX:XXXXX] End of script output before headers: index.php, referer: https://www.website.co.uk/custom-adminarea/adminpage/
    [Tue Feb 16 11:03:21.719369 2016] [core:error] [pid 2863] [client XXX.XXX.X.XX:XXXXX] End of script output before headers: admin-ajax.php, referer: https://www.website.co.uk/subfolder/blogpage

Everyone who I have asked is unfamiliar with wordpress and how it handles the index.php for respective pages - a few have said you need to 'optimize your index.php page' which makes no sense as most of the WP index files are blank to prevent browsing folders.

I develop any changes solely on my local computer and cannot find a single line referencing this problem in my local logs.

  1. Secondly, I'm not sure if this is related but we had a burst of 2,000 website hits in an hour period. This somehow brought the server to it's knees... It's a dedicated server [stats below] and the dump sql size is only 150+ MB. Page load times went from 1 sec with a 55 query page to 60-90 seconds with page timeouts. If the two problems are related I need to fix it!

    • Intel Xeon E3-1220 V2 (4 CPU)
    • 16GB Memory
    • SuperMicro USAS2LP-H8iR SMC2108 / LSI MegaRaid 9260-8i RAID Controller
    • 2x 128GB Crucial SSD
    • RAID 1
    • CentOS 6 x64
    • Proactive Monitoring and Alerting SLA
    • Anti-virus
    • 10 TB Bandwidth
  • you know it is off-topic as php errors are off-topic..... The meaning of the error itself is very clear, you do output before http headers are sent. It is totally impossible to guess which part of your site does it, disable plugin and reactivate them untiil you find the one responsible for this and them audit its code. – Mark Kaplun Feb 16 '16 at 12:53
  • The error is End of script output *before* headers not the usually occurring output before headers sent - although we only run a few plugins these are essential to the site and I, unfortunately cannot disable them for live site there is too much through traffic. The error does not manifest itself on local machine. WPSE is about sharing knowledge to solve problems - one person's mountain can be another person's molehill. All the resources and people I have asked so far point to wordpress as the area of investigation. – Bysander Feb 16 '16 at 13:09
  • 1
    if you can not disable, you will need better error logging. WPSE is about good question that can get good answers bad questions that can not get answers are just a waste of resources. – Mark Kaplun Feb 16 '16 at 13:21
  • Apologies but I find it's also a community of developers that do end up asking general questions and often help point each other in the right direction to solve their own problems, whether it's via comments or an actual answer. I have found countless comments to particular question pages which have good SEO thanks to SE with no answers to question but the comment has helped solved the problem. I guess, it's more of a trusted resource for me than an instruction manual. – Bysander Feb 16 '16 at 13:40
  • This is a Q&A site, not a discussion forum.... obviously whenever you have more then one person regularly participating in discussions you will get a community, but communities can be non productive, having a "community" is not a value by itself. Questions that can not be answered generate noise which detract community member from participating. As for comment and answers to off-topic questions, obviously there is no reason not to help someone if you can, still don't bet on getting it as the reason why something is off-topic is that the community do not want to answer it. – Mark Kaplun Feb 16 '16 at 13:50

I develop any changes solely on my local computer and cannot find a single line referencing this problem in my local logs.

You should always try to simulate your production environment on a dev environment. For server specs this might not bee easy, but at least the running software should nearly be the same. This includes Apache version + loaded modules, PHP, MySQL, etc as well as their configurations.

Then check if error occurs locally. If so, turn off plugins one by one and check when error disappears to get a hint on whats going wrong.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.