Closed futuarmo closed 2 years ago
您的信已收到,我将尽快给您答复
@futuarmo assuming that the connection is ended by the core of Nginx due to an error related to the configuration you mentioned, the only place to log this would be the handler defined to when a request is closed.
The challenge will be to distinguish between the normal close and a close due to an error.
It would be required a deeper investigation to see if on the request instance has some information noted on it.
@wandenberg Thank you for information
Hello! I have a question, please, help to find an answer Here is the case: I have nginx with pushstream module. When I send a lot of messages with high rate, my websocket connection closes and I lose some messages. I found the reason: net.ipv4.tcp_wmem cache size. But I want to log moment when websocket closes. Please, help me to find that place in pushstream module source code. In code it looks like this call chain:
and there in lines:
And at that moment subscriptions are empty. As I understand somewhere websocket was closed and subscribers were removed.