Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Setting isBulk to true, causes "Error: Callback was already called." #13
Comments
|
maybe related to wavded/winston-mail#33 |
|
Thanks for reporting! |
|
hey guys - any update? |
|
Hey we haven't had a chance to look at this one yet. We have some other tasks ahead of this one in the queue, including #12. Hoping we can look at this next month. If you find a solution before then please share |
|
Sorry to me too, but me too. Really glad someone posted this cuz my stack trace is not available so I was kind of in the dark about what was causing it. |
This is an example of a fix for loggly/winston-loggly-bulk#12 with a small amount of code change. Note that these lines: ``` if (timerFunction === null) { timerFunction = setInterval(function () { sendBulkLogs(); },30000); } ``` produce the same bug when `isBulk` is `true`. See loggly/winston-loggly-bulk#13
|
We just released version 2.0.1 which we believe contains a fix for this. Please reopen if it happens again after updating. |
|
Hey, I am having the same issue with the version
Stack Trace:
Thanks! |
|
@ianaya89 thanks for reporting this we'll have someone take a look at it. In the meantime, can you tell us which version of node-loggly-bulk you are using? |
|
Same issue as ianaya89 Error Code- 504 "Gateway Time-out"
Error: Callback was already called. |
|
@mostlyjason Thanks for your reply. The version seems to be |
|
Hi @ianaya89 and @jfitzpatrick13, Can you please confirm if you are using version Thank you. cc: @mostlyjason |
|
@Shwetajain148, My setup is Thanks |
|
The same problem problem I am using Ubuntu 16.04 Looks like it happens when loggly servers returns an error, or some network problems. |
|
Hi @Shwetajain148, I am using:
|
|
Same issue |
|
Same issue here: |
|
Same issue also:
|
|
Same issue. Using winston-loggly-bulk |
|
Same issue. Using winston-loggly-bulk. |
|
Same issue. Using winston-loggly-bulk. winston: backtrace:
|
|
I traced this issue down to loggly/node-loggly-bulk#31. node-loggly-bulk's log function is calling its callback twice when the Loggly servers return a bad status code and then a success on a retry. This is causing a call to a async.forEach in winston.log to throw a error when transportLog calls I am working on a fix. |
|
Awesome thanks @blyork! This has been hard to nail down. I look forward to the fix you mentioned. |
|
We are also running into this. Looking forward to an updated npm release with a fix! Thanks! |
|
any update on this issue? we are getting this problem every day several times, and it restarts our application, very annoying. |
|
So close.... bump can we please give this PR a look?! |
|
Can't wait for this to get merged! |
|
We really need this one, too! |
|
I am waiting patiently, but cannot use loggly until this is fixed. |
|
cc @mostlyjason |
|
Hey everyone, we apologize for the delay in responding to this issue. I'm working right now on making sure it's brought to the right people's attention to be fixed ASAP. |
|
Hey everyone, Greetings! I have published a beta package version 2.0.4 of winston-loggly-bulk which contains the fix for this callback error and also improves the retry mechanism of the library on different errors. Feel free to test the below beta package in your environment and let me know your feedback. I will release the package in production when you guys will confirm that everything works fine. Install beta package using the below command:
This beta package internally install node-loggly-bulk's beta package version 2.2.2. cc: @mchaudhary |
|
I will let you know how it goes. Thank you all! |
|
Hi @ianaya89 @jfitzpatrick13 @rushisan @alimvedats @alexeyts @blyork @magland @amrshakya @matteo-harpoon @dguillamot @Samstiles @relicmelex @xolubi.. Did you guys get some time to test the above beta package that I published which contains the fix for the callback error? I want to listen from you so that I can go ahead and release the fix in production. Comment Ref- #13 (comment) |
|
Unfortunately I haven't had any slew of errors to trigger what would have been the bug. I'm doing some testing soon and will let you know if there are any negative effects. If you don't hear back from me in 10 days, assume all is well and it didn't get triggered, and I just forgot to come back here and tell you. |
|
As this issue constantly happened in our production system and we did not succeed fixing it in a reasonable timeframe, we abandoned the use of this library. |
|
Unfortunately we're in the same boat as @alexeyts :( We had no other choice and don't have the bandwidth now to swap back |
|
I think mine was an isolated case, I haven't seen this crash in my app's
console output again.
--
Sent from my iPhone
|
|
I plan to test it soon and will let you know. Thx for the fix |
|
Hi everyone! I have released the
Thanks! |
|
Giving this a go. FYI, if you're using yarn, you'll need to |
|
@Shwetajain148 this action rolled me back to |
|
@relicmelex 2.0.2 is correct for |
|
Looks like node-loggly-bulk v2.2.2 did the trick. No errors for last 30 hours. |
|
I've also encountered this error. I'm still in my trial period and was not so happy that the library crashed my server. I'll see if this does the trick. |
|
I can confirm the new version fixed it for me- since my last comment I've had several more instances in my logs of intermittent trouble connecting to Loggly and it's no longer crashing the app. |
|
Hi everyone, since this issue has been handled in node-loggly-bulk's 2.2.2 release, I am going ahead and closing this one. Thanks! |
|
We upgraded to
Or, maybe the actual message is in there, but there's no way to tie back to the Log #. Up until this upgrade, we would get the occasional |
|
We have also been having a lot of connection errors after the upgrade
|
|
I've been flooding my loggly pipe with load tests, and I haven't gotten a single one, can you copy in your implementation details as the error log it appears isn't super helpful as to 'why' it's happening here? @DJphilomath Also it looks like for you it's every 10 seconds pretty on the nose, do you have a timeout somewhere or a load balancer with connection draining? |
|
I've been seeing a lot more errors on the console, but they're not crashing
the app like before. Haven't actively been checking Loggly though.
--
Sent from my iPhone
|
|
I've dug a bit deeper. Seems the app isn't actually crashing, but the CPU is spiking, which is leading to autoscaling events, so the affected server gets rotated out. That was hard to diagnose because the logs aren't making it through to Loggly :/ I have filed a report with Loggly also, since it seems to be bursts of network issues. It seems like the issue is degraded network activity on their side which leads to this library getting overloaded with retries. Here are the times we've noticed degraded network performance from Loggly:
Here's our winston setup:
|
we get this issue once we switched bulk delivery on.
here is the stack trace
The text was updated successfully, but these errors were encountered: