Question

diagnose an error-less server crash

Posted December 31, 2021 106 views
Node.jsDebian

I’ve had a Debian droplet for years now, running some node / Express apps, so I’m pretty familiar with the usual code-based crashes.

However I’ve noticed sometimes there is no error. The CPU usage looks totally normal like, 10%. I do have several apps running on one droplet though. (Usually zero users on) So one thought was if I ran out of server resources - that might cause a silent crash ?

How would I go about diagnosing this ? Is there another log besides the stdout log from pm2 ?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

If you’re using Nginx as proxy server, check the logs from there too.

Choked server resources can lead to your simply not responding. But if Nginx is proxying, you might be informed from the nginx logs about that happening.

  • idk, not seeing anything there.
    About 100 lines of failed “open()” files, for bots spamming non-existent wordpress env files and the like. And then some failed “connect()” statements from leftover blocks I left active, but I’m pretty sure those requests just died harmlessly.

    I’m 90% certain it’s RAM or CPU… I’m running a game with many intervals so the chance of a missed reference and subsequent memory leak is high.

    Sometimes when I SSH in, that alone is the ‘straw that broke the camels back’ it seems, and there will be an instant restart - but just of this one app… I don’t get it. If it was the whole droplet suffering, wouldn’t all the apps restart ?

    And still no traces of this in the server resources… they all look super low in the DO panel, even at the time of known crashes. Maybe runaway leak prevents proper resource reporting though, wouldn’t that be a doozy…

    One obvious step is for me to pay the five dollars for a separate droplet, hah, so I could at least diagnose that way. I’ll do that soon if I can’t make any headway.