You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using winston and its http transport to send logs.
Memory leak happens when running stress test under nodejs 18. Set --max-old-space-size=256 when testing so that memory leak happens more quickly.
Memory leak not happens when stress test with pure Express app.
Memory leak happens when stress test with Express app to send logs.
A log server to receive logs with nodejs 20.12.2
This is an express app to receive logs, just for testing.
If you has other log server could be used, please use it.
constexpress=require('express')constapp=express()constport=3030app.post('/log',(req,res)=>{console.log(`Log received at ${Date.now()}`);res.send('Log received!')})app.get('/',(req,res)=>{res.send('Hello!')})app.listen(port,()=>{console.log(`Log server app listening on port ${port}`)})
🔎 Search Terms
Memory Leak, OOM
The problem
Dear developers,
I'm using winston and its http transport to send logs.
Memory leak happens when running stress test under nodejs 18.
Set
--max-old-space-size=256
when testing so that memory leak happens more quickly.Memory leak not happens when stress test with pure Express app.
Memory leak happens when stress test with Express app to send logs.
Error Stack
What version of Winston presents the issue?
v3.13.0
What version of Node are you using?
v18.20.2
If this worked in a previous version of Winston, which was it?
No response
Minimum Working Example
Here is my repo to reproduce memory leak, please use it for testing.
https://github.com/eric-wei1990/winston-http-oom
A winston http client to send logs with nodejs 18.20.2
Set
--max-old-space-size=256
so that Memory Leak is triggered more quickly.A log server to receive logs with nodejs 20.12.2
This is an express app to receive logs, just for testing.
If you has other log server could be used, please use it.
Use artillery to running stress tests
Additional information
Memory leak happened when sending logs with nodejs 16.13.1 and nodejs 18.20.2.
Not happens when sendling logs with nodejs 20.12.2.
The text was updated successfully, but these errors were encountered: