apisix
apisix copied to clipboard
bug: http connections not closed in http-logger plugin
Current Behavior
We set up a http-logger to send requests to ActiveMQ using the http protocol. After some time, we noticed that the ActiveMQ hangs and is not responsible any more.
After some investigation, we found out that the number of open connections between APISIX and ActiveMQ is increasing.
Currently in our system, we have ~150 connection in ESTABLISHED, TIME_WAIT, LAST_ACK and CLOSE_WAIT states. By increasing load on APISIX, this number increase.
By examining the source code for http-logger.lua, I can observe that http connection is opened, but never closed, which could lead to the connection leak when we have largen number of requests.
Expected Behavior
No response
Error Logs
No response
Steps to Reproduce
- Configure http-logger plugin to send request data to ActiveMQ http endpoint
- Run stress test on APISIX
- Observe number of open http connections between APISIX and ActiveMQ
Environment
- APISIX version 3.9