TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Why does this site return status 500 but still work?

4 pointsby theSageabout 9 years ago

1 comment

patio11about 9 years ago
RFC 2616: For 5xx error codes, <i>User agents SHOULD display any included entity to the user.</i> If your server serves up HTML on a 500, it should get rendered. This page happens to serve up HTML.<p>Why? Well, the server administrators would have a better idea after investigating than I do.<p>If I were playing the percentages, I&#x27;d guess &quot;a poorly coded WordPress plugin is causing rendering the index page to time out <i>after</i> all content has been sent down the pipe; Apache then terminates the connection with a 500 error and sends down all the content it buffered locally prior to the timeout, which in this case happens to be everything.&quot;<p>Circumstantial evidence: no errors on rendering static resources even though they appear to go through the same server. Other dynamic pages show very long time to first byte but sporadically give HTTP 200s; I&#x27;m assuming that they render completely and return control before Apache times out the PHP.