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.
19 Replies
Project ID:
b855592c-9156-4020-9543-d41a4e939fde
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
have you tried restarting it
Solution
Restarted, no change
Redploying fixed it; just came back up now.
Why would a redeploy solve it? Was there a problem with the machine it was on?
seems like your app crashed without logging any errors
at least thats my best guess
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
just hoping something will log is not the way to go about things
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
well for starters, you are logging to either stdout/stderr or a 3rd party logging service right?
process.stderr.write, and console.log
it seems you must have missed something then
there where no reports of hosts going offline
Is there a try/catch that wraps around an entire NodeJS app?
thats something you would have to research
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?
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
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 }) {
awsome
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.