pipy
pipy copied to clipboard
Suspicious memory usage
What happened
Run pipy proxy with script in sample/http
, client send requests to route /
, /api
, /api/private
, /hi
, /home
in http/https randomly. Run several rounds of the test, and I notice that the memory usage of pipy may ramp up at the time of new run starts.
Reproduce the issue
- Start pipy with script in
sample/http
, two upstreams, and one http server for responding the pipy logging request - Run test by k6 and the attached test.js.gz script several times
while true; do ./k6 run -d 2m -u 1000 test.js; sleep 180; done
Expect behavior
Should some of the memory be recycled after testing, or should the mem usage be stable?
Screenshots
Version info
Version : 0.50.0-37
Commit : 5c115a842c4e98559fd83a6271be2d3ba79ef914
Commit Date : Tue, 26 Jul 2022 19:08:51 +0800
Host : Linux-5.15.0-1014-azure x86_64
OpenSSL : OpenSSL 1.1.1q 5 Jul 2022
Builtin GUI : No
Tutorial : No
Thanks for the report.
From my test here, it seems to happen only with the TLS path. Could you please skip TLS in your test just to see if that's also true in your environment?
I tried another round of test, exclude the TLS urls, the memory usage could keep stable till now.
But at the first few hours, memory still ramp up several times. Not confident, I'm trying reproducing it, if possible.
Will be back if there is any further update.
Comes after two days test, with HTTP url, the usage change slightly.
btw, i started 4 pipy instances with --reuse-port
each time, hope this is irrelevant.

This issue was found in a very old version. Since it hasn't been seen in other versions later on, I'll close it for now.