Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some pending events are preventing the Telemetry Data Server process to exit on its own #76

Open
1 of 2 tasks
nunoguedelha opened this issue Nov 10, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@nunoguedelha
Copy link
Collaborator

nunoguedelha commented Nov 10, 2021

The process should exit automatically if there is no pending queued events in the Node Event Loop. But for some reason, there are pending events preventing the process to exit on its own. A workaround, consisting in calling process.exit() for forcing the exit, has been used so far, but here we try to identify the problem root cause and design a permanent proper solution accordingly.

References

Event Loop
https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout
https://nodejs.dev/learn/the-nodejs-event-loop
https://nodejs.dev/learn/understanding-process-nexttick
https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop

  • Closing all the ports manually (instead of letting the on exit callback do it). => does not solve the problem.
  • Checking the pending handles and requests in the Event Loop. ⏳
@nunoguedelha nunoguedelha added the bug Something isn't working label Nov 10, 2021
@nunoguedelha nunoguedelha self-assigned this Nov 10, 2021
@nunoguedelha
Copy link
Collaborator Author

Closing all the ports manually, and checking the pending handles and requests in the Event Loop ⌛

Originally posted by @nunoguedelha in #61 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant