Skip to content

unhandledRejection in flush method #30

@changgengli

Description

@changgengli

When testing in in our production environment I noticed unhandledRejection with follow stack trace logged.

It seems this is around here

I also noticed EPIPE errors but the stack trace is not very helpful to pinpoint where exactly is wrong.

Error: write EPIPE
    at afterWriteDispatched (internal/stream_base_commons.js:156:25)
    at writeGeneric (internal/stream_base_commons.js:147:3)
    at Socket._writeGeneric (net.js:787:11)
    at Socket._write (net.js:799:8)
    at doWrite (_stream_writable.js:403:12)
    at writeOrBuffer (_stream_writable.js:387:5)
    at Socket.Writable.write (_stream_writable.js:318:11)
    at /srv/test/node_modules/@fluent-org/logger/build/src/socket.js:590:45
    at new Promise (<anonymous>)
    at FluentSocket.innerWrite (/srv/test/node_modules/@fluent-org/logger/build/src/socket.js:586:16)
    at FluentSocket.write (/srv/test/node_modules/@fluent-org/logger/build/src/socket.js:630:21)
    at FluentClient.sendNext (/srv/test/node_modules/@fluent-org/logger/build/src/client.js:459:42)
    at FluentClient.syncFlush (/srv/test/node_modules/@fluent-org/logger/build/src/client.js:321:36)
    at /srv/test/node_modules/@fluent-org/logger/build/src/client.js:336:30
    at processTicksAndRejections (internal/process/task_queues.js:79:11)
    at runNextTicks (internal/process/task_queues.js:66:3)
    at processImmediate (internal/timers.js:434:9)
    at process.topLevelDomainCallback (domain.js:138:15)
    at process.callbackTrampoline (internal/async_hooks.js:124:14)

Other stack trace:

Error: write EPIPE
    at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:94:16)
    at WriteWrap.callbackTrampoline (internal/async_hooks.js:126:14)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions