You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it might be related due to my process being extremely CPU intensive, that might be causing the lines to not show up in the weblogs? However I had no such issues with PM2-Web...
If you run your app manually and are writing to stdout or stderr via console.log or whatever, this is a synchronous blocking operation so will work as you expect. When run under guvnor the logs get sent as events from your process to the daemon.
If your app is doing a lot of very CPU intensive work it's possible you are blocking the event loop so these events will stack up and never be emitted.
If you structure your app to do discrete packets of work with promises or the async library or generators or whatever, it'll give the event loop a chance to run between chunks of work and your logs should appear as expected.
I'm using Winston as a logging library and am also logging to disk with Winston (all sync). I added a small queue between log messages of 50 ms between messages to give the event loop more chances to run. Now everything seems to appear in Guvnor. Still strange that this used to work perfectly in PM2-Web...
Hi,
When I run my application with Guvnor and use:
guv logs myapp
I can see all lines that I expect when I would be when running my app manually.
But when looking at the logs from the web interface I see that some lines are missing and others are printed in a seemingly random way.
What's going on here?
The text was updated successfully, but these errors were encountered: