Closed ronag closed 3 years ago
Seems related to cluster / child process + sync: false
. We changed to sync: true
on our http cluster workers.
I suspect this can have something to do with sonic boom MAX_WRITE
which I think might cause messages to be split.
A test case would be most helpful.
I think the diagnosis is correct and #96 is the only solution.
I think the diagnosis is correct and #96 is the only solution.
Do you mean https://github.com/pinojs/sonic-boom/issues/96?
ah yes.
I can confirm i'm encountering something similar when logging a huge amount of data to stdout too.
@zekth what version are you using?
6.13.2
I'll try to write a test to show the issue. But it happens on heavy load, might be hard to reproduce.
@zekth I would say try with pino@7. It should solve this.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
We just encountered a little weird output from one of our services. We use both worker threads and cluster in this service. All of the child processes/threads use pino with
sync: false
to output to stdout. What we've noticed is that sometimes the output of the different child process become interleaved which makes us think that the writes from pino are not atomic in the sense that the full string of serialized json is guaranteed to be transferred to the parent process stdout in one piece.Are we doing something wrong here? Should we instead use pino-transport to "transport" all messages from child processes to the parent process and have only the parent process write to stdout?
Pino: @6.13.0