Memory leak in function responseInterceptor
of file handlers/response-interceptor.ts
#929
Open
2 tasks done
Checks
http-proxy-middleware
.Describe the bug (be clear and concise)
Memory leak is found in function
responseInterceptor
of filehandlers/response-interceptor.ts
:// concat data stream
_proxyRes.on('data', (chunk) => (buffer = Buffer.concat([buffer, chunk])));
The buffer cannot be released especially when the response data is very large.
Step-by-step reproduction instructions
Expected behavior (be clear and concise)
No memory leak.
Working code:
How is http-proxy-middleware used in your project?
What http-proxy-middleware configuration are you using?
What OS/version and node/version are you seeing the problem?
npx: installed 1 in 1.045s System: OS: Linux 5.14 SLES 15-SP4 CPU: (16) x64 Intel(R) Xeon(R) Silver 4214R CPU @ 2.40GHz Memory: 14.22 GB / 31.33 GB Container: Yes Shell: 4.4.23 - /bin/bash Binaries: Node: 18.12.1 - /opt/miep/bin/node npm: 6.14.15 - /opt/miep/bin/npm Managers: RubyGems: 2.7.6.3 - /usr/bin/gem Utilities: Curl: 8.0.1 - /usr/bin/curl IDEs: Vim: 9.0 - /bin/vim Languages: Bash: 4.4.23 - /bin/bash Java: 1.8.0_372 - /usr/bin/javac Perl: 5.26.1 - /usr/bin/perl Python: 3.6.15 - /opt/miep/bin/python Python3: 3.6.15 - /usr/bin/python3 Ruby: 2.5.9 - /usr/bin/ruby Databases: SQLite: 3.39.3 - /usr/bin/sqlite3
Additional context (optional)
No response
The text was updated successfully, but these errors were encountered: