negasus / haproxy-spoe-go

Haproxy SPOE (Stream Processing Offload Engine) Agent Golang implementation
MIT License
35 stars 12 forks source link

Memory leak? #18

Closed devasmith closed 1 year ago

devasmith commented 1 year ago

Hi. We are using coraza-spoa which is using this library. Notices that this service is gradually increasing it's memory usage. This service is now enabled on a site that has a lot of incoming requests to process.

Took out a pprof file and a graph of the memory consumption.

profile001 Screenshot 2023-10-09 at 08 40 52

Together with this memory usage we notice this: level=warning msg="spoe: error handling connection: disconnect error: I/O error"

Not sure if this is connected to haproxy-spoe-go or something else but that causes a lot of the requests to not be processed correctly (Failed to parse request body).

Any clue on how we can troubleshoot this further?

negasus commented 1 year ago

I will try to investigate this issue and returns later

negasus commented 1 year ago

Judging by the picture, this code from https://github.com/criteo/haproxy-spoe-go library. But I found some porential leaks in my library) thanks. It will fixed soon

15ljindal commented 1 year ago

Filed https://github.com/criteo/haproxy-spoe-go/issues/39 as I ran into the same issue with https://github.com/criteo/haproxy-spoe-go