winstonjs / winston-syslog

A syslog transport for winston
http://github.com/winstonjs/winston-syslog
MIT License
138 stars 119 forks source link

Occasional ECONNRESET and EPIPE errors #162

Open brianlukoff opened 3 years ago

brianlukoff commented 3 years ago

We are using winston to log to Papertrail over syslog. Occasionally winston will throw an ECONNRESET or an EPIPE here, when attempting to send a log message:

Error: write EPIPE
  File "internal/stream_base_commons.js", line 156, col 25, in afterWriteDispatched
  File "internal/stream_base_commons.js", line 147, col 3, in writeGeneric
  File "net.js", line 798, col 11, in TLSSocket.Socket._writeGeneric
  File "net.js", line 810, col 8, in TLSSocket.Socket._write
  File "internal/streams/writable.js", line 358, col 12, in writeOrBuffer
  File "internal/streams/writable.js", line 303, col 10, in TLSSocket.Writable.write
  File "/opt/meteor/dist/bundle/programs/server/npm/node_modules/winston-syslog/lib/winston-syslog.js", line 255, col 21, in null.<anonymous>
    this.socket.write(syslogMsg, 'utf8', onError);

Has anyone run into this -- any ideas about how to avoid?

mhassan1 commented 3 years ago

maybe related? nodejs/node#40553