Nginx caching 500 Internal Server Error response

Francis Daly francis at
Mon Jun 28 18:10:00 UTC 2021

On Thu, Jun 24, 2021 at 03:36:42PM -0400, TheMask wrote:

Hi there,

> From last 8-9months we are facing one issue in which nginx 500 response
> spike obseved. And we didnt see any call to upstream. It seems like Nginx
> caches the 500 response and that us served back to user.
> We have to restart the Nginx every time when issue occurred.

You appear to be reporting that your configuration is doing something
that the documentation suggests should not happen by default.

Can you share a configuration that shows the problem?

(And, just in case -- can you see that the response is an actual http
500, not a http 200 with an application-specific "this is a 500" in the
response body?)


Francis Daly        francis at

More information about the nginx mailing list