How to troubleshoot runaway (100% CPU) deno process
Deno has been running a couple of websites rock solid for many months. But during last week or so I've had the server (
No idea if it's a Deno bug, or bug in my code (like a blocking infinite loop or something). Thing is, I have no stacktrace, console.log output, or error logs to work with. I only know Deno process is stuck with something, using a lot of CPU and unable to serve requests (connection times out). Problem is I don't know where it is stuck.
I do push new versions out every couple of days or so, as well as update deno to latest version regularly. Both deno and my own code has changed in this timeframe so I can't really say whether this problem is related to some version of Deno, or is it related to my userland code updates.
Is there any way to perhaps stop/interrupt a running Deno process from the outside and get some info what it was doing at the moment to try and find the problem? Again not sure if it's Deno internal problem, or a problem with my userland code, or a problem in some third party library. No hints in stdout/stderr.
I have no idea how to reproduce the issue other than letting it run on production server and just wait perhaps days or weeks for the issue to manifest. Since this only happens rarely, on production server, obviously I'd like to run any diagnostics or tracing tools quickly to then kill deno and restart the process as soon as possible.
using Deno.serve()) go unresponsive twice. That is, connection times out and I can see 100% CPU usage for the Deno process. No idea if it's a Deno bug, or bug in my code (like a blocking infinite loop or something). Thing is, I have no stacktrace, console.log output, or error logs to work with. I only know Deno process is stuck with something, using a lot of CPU and unable to serve requests (connection times out). Problem is I don't know where it is stuck.
I do push new versions out every couple of days or so, as well as update deno to latest version regularly. Both deno and my own code has changed in this timeframe so I can't really say whether this problem is related to some version of Deno, or is it related to my userland code updates.
Is there any way to perhaps stop/interrupt a running Deno process from the outside and get some info what it was doing at the moment to try and find the problem? Again not sure if it's Deno internal problem, or a problem with my userland code, or a problem in some third party library. No hints in stdout/stderr.
I have no idea how to reproduce the issue other than letting it run on production server and just wait perhaps days or weeks for the issue to manifest. Since this only happens rarely, on production server, obviously I'd like to run any diagnostics or tracing tools quickly to then kill deno and restart the process as soon as possible.
