Application failed to respond. NodeJS server seems to be down. MySQL fine

Hi, my production server went down around 5:18pm Pacific. Still down, getting the 'Application failed to respond" message. Dev server is running fine. My logs are not appearing in the deployment logs.
Solution:
Restarted, no change
Jump to solution
19 Replies
Percy
Percy17mo ago
Project ID: b855592c-9156-4020-9543-d41a4e939fde
VoiceOfSoftware
VoiceOfSoftware17mo ago
Project ID b855592c-9156-4020-9543-d41a4e939fde, Endpoint https://troubled-finger-production.up.railway.app/api/calendar I restarted, no change. Redeploying now, just in case that helps
Brody
Brody17mo ago
have you tried restarting it
Solution
VoiceOfSoftware
VoiceOfSoftware17mo ago
Restarted, no change
VoiceOfSoftware
VoiceOfSoftware17mo ago
Redploying fixed it; just came back up now. Why would a redeploy solve it? Was there a problem with the machine it was on?
Brody
Brody17mo ago
seems like your app crashed without logging any errors at least thats my best guess
VoiceOfSoftware
VoiceOfSoftware17mo ago
I log tons of messages; what's the best way to log errors before a crash? I was hoping big-enough errors would write to the logs automatically Also, it seems like a restart would bring it back up, if it had crashed
Brody
Brody17mo ago
just hoping something will log is not the way to go about things
VoiceOfSoftware
VoiceOfSoftware17mo ago
Agreed, but because I don't have access to the filesystem, I have no visibility to system logs. What are your best practices for logging in this case? Where does one intercept crashing errors and write logs before the system goes down? I have TONS of logging messages, so I must not know where EXACTLY one puts the code that would capture that kind of system-killer
Brody
Brody17mo ago
well for starters, you are logging to either stdout/stderr or a 3rd party logging service right?
VoiceOfSoftware
VoiceOfSoftware17mo ago
process.stderr.write, and console.log
Brody
Brody17mo ago
it seems you must have missed something then there where no reports of hosts going offline
VoiceOfSoftware
VoiceOfSoftware17mo ago
Is there a try/catch that wraps around an entire NodeJS app?
Brody
Brody17mo ago
thats something you would have to research
VoiceOfSoftware
VoiceOfSoftware17mo ago
OK, I guess I don't understand how a restart of the service didn't solve it. Only a full redeploy solved it, so it seems restart doesn't really restart?
Brody
Brody17mo ago
i am not familure with the systems behind the restart function, but its possible that if your app bricked itself a restart may not restart
VoiceOfSoftware
VoiceOfSoftware17mo ago
OK, this is SvelteKit, so it looks like there's a hooks.server.js function that's high-level enough to capture app-wide errors /** @type {import('@sveltejs/kit').HandleServerError} */ export function handleError({ error, event }) {
Brody
Brody17mo ago
awsome
VoiceOfSoftware
VoiceOfSoftware17mo ago
The reason I ask about logging on the system side is becaues every other system I've used has crash logs that are automatically written. As an end-user, I have no access to such things in a managed environment like Railway, but I would imagine your datacenter folks do. It would be very helpful to expose those somehow. I can't imagine a system going down without its own logging of some kind regardless of what the userspace app logs on its own.
Want results from more Discord servers?
Add your server