How to make nginx fail if it can't write to cache dir.

Reinis Rozitis r at roze.lv
Thu Jan 27 14:08:59 UTC 2022


> I fail to see why it will keep on answering to new requests if it can't
fulfill any of them.

Because there might be other requests which can be answered without touching
the problematic cache directory?
While the error is critical (for the particular request) I don't think it
makes sense for nginx to stop/kill itself. 

If you need such functionality/behavior maybe a simple script which checks
the nginx error log for 'crit' entries and performs 'killall -9 nginx' might
work in your case (or use something like sec
(https://simple-evcorr.github.io/) for example) ?

rr




More information about the nginx mailing list