Open suprith-s-reddy opened 1 year ago
I'm hitting this same error without nest.js. I'm seeing it on windows only when I blow through the maxFiles and maxSize during a single run. So if node is constantly running it seems to maintain reference to the original log file and that file's permissions prevent me from modifying the file. This triggers the write after end error (which goes uncaught even with handleExceptions).
I'm wondering if this issue is linked too: https://github.com/winstonjs/winston/pull/2115/files
I'm wondering if this issue is linked too: https://github.com/winstonjs/winston/pull/2115/files
I am not sure, this issue only appeared when there was an overload of requests. You can just click the post option multiple times and see it in your code. I think its a bug with Winston and it hasn't been fixed. Did you find a solution for this one?
Has any workaround been figured out for this issue?
A PR would be welcomed if anyone has time to investigate this further!
Has anyone found a solution? latest version 3.11.0 on NPM with same problem.
I've found the solution: switched to pino logger instead of waiting this (2-years old) issue to be fixed
Any updates on this? Hitting this on AWS Lambda
🔎 Search Terms
Write after end node error
The problem
Is there an existing issue for this?
Current behavior
I am using nest-winston and winston packages to invoke a global logger for my nestjs API.
I am using postman to test my requests and responses. When I am hitting the send request button very quickly without a delay, there is an overhaul of requests which does not allow winston to end its stream write operation, creating a write after end Node error which breaks the whole API. It also stops the server at the moment. Below is the output.
The error occurs irrespective of the API call with the above configuration. I would like to know if this is a bug by nest-winston or the core winston package itself and if there is any workaround for the same.
package
nest-winston and winston
NestJS version
9.0.0
Node.js version
18.11.0
In which operating systems have you tested?
What version of Winston presents the issue?
v3.8.2
What version of Node are you using?
v18.11.0
If this worked in a previous version of Winston, which was it?
No response
Minimum Working Example
So I have defined the below code as a winston logger config:
file: winston-logger.config.ts
file: main.ts
file: app.module.ts
Packages versions
Additional information
No response