Welcome! Log In Create A New Profile

Advanced

Cancelling aio operations on Linux

September 02, 2016 02:30PM
Hi,

Recently while reloading/restarting nginx I've been getting errors such as:
2016/09/02 11:13:44 [alert] 16480#16480: *1234 open socket #123 left in connection 123

After setting `debug_points abort` and checking the core dump, I found that all requests were blocked on file aio (they had r->blocked and r->aio both set to 1)
I then looked at the nginx source and saw this comment:
/*
* FreeBSD file AIO features and quirks:
....
* aio_cancel() cannot cancel file AIO: it returns AIO_NOTCANCELED always.
*/

My question is - from your knowledge, does aio_cancel work correctly on Linux ?
If so, can you provide some high level guidance for implementing it ?

Btw, it is clear that there is some problem with the storage that makes aio read operations hang forever, and cancelling them isn't the ideal solution, but that will at least prevent them from having a cumulative negative effect on the server.

Thank you !

Eran
Subject Author Posted

Cancelling aio operations on Linux

erankor September 02, 2016 02:30PM

Re: Cancelling aio operations on Linux

erankor November 15, 2016 04:41PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 261
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready