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
Percy2y ago
Project ID: b855592c-9156-4020-9543-d41a4e939fde
VoiceOfSoftware
VoiceOfSoftwareOP2y 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
Brody2y ago
have you tried restarting it
Solution
VoiceOfSoftware
Restarted, no change
VoiceOfSoftware
VoiceOfSoftwareOP2y 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
Brody2y ago
seems like your app crashed without logging any errors at least thats my best guess
VoiceOfSoftware
VoiceOfSoftwareOP2y 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
Brody2y ago
just hoping something will log is not the way to go about things
VoiceOfSoftware
VoiceOfSoftwareOP2y 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
Brody2y ago
well for starters, you are logging to either stdout/stderr or a 3rd party logging service right?
VoiceOfSoftware
VoiceOfSoftwareOP2y ago
process.stderr.write, and console.log
Brody
Brody2y ago
it seems you must have missed something then there where no reports of hosts going offline
VoiceOfSoftware
VoiceOfSoftwareOP2y ago
Is there a try/catch that wraps around an entire NodeJS app?
Brody
Brody2y ago
thats something you would have to research
VoiceOfSoftware
VoiceOfSoftwareOP2y 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
Brody2y 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
VoiceOfSoftwareOP2y 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
Brody2y ago
awsome
VoiceOfSoftware
VoiceOfSoftwareOP2y 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