juttle / winston-logrotate

Log rotating transport for Winston
Apache License 2.0
10 stars 8 forks source link

rotation stalls process indefinitely #18

Closed dcopp closed 6 years ago

dcopp commented 6 years ago

A small rotation "stress test" surfaces a defect in rotation. Configure a logger with small size that guarantees a rotation after every logger.info(). Then run a series of logger.info() paced at 10ms, and the process will stall. Enabling some console logging after each logger.info() avoids the stall, allowing the series to complete and produce the expected log files.

While the process is in the stall, an ls command shows an interesting error that seems to indicate a rotation file is in the process of being created but isn't quite there yet.

Same result with node 8.9.4 or 6.11.2; CentOS6 or Windows 2016. Repro module attached. rotatebug.zip

dcopp commented 6 years ago

Hah test bug on my part! Sorry.