a year ago
Hi, I have process.exit() in my script to force restarts and it doesn't seem to be triggering restarts, manually doing it from the dashboard is also 50/50
39 Replies
a year ago
c874129c-de81-442a-86fc-4749b499194b
a year ago
one of many projects with the same issue
What's the service restart policy? I believe it's set to on failure by default, and calling process.exit() with no exit code isn't considered to be abnormal exit by any of the stdlibs
a year ago
I always set mine to always
a year ago
So I don’t think it’s that
a year ago
But I can try process.exit(1)
You can also try setting up health checks, services are restarted automatically when those fail
a year ago
I’ll give it a look!
a year ago
hmmm we don't have passive healthchecks though
a year ago
<:monkaS:620823495844036618>
a year ago
I know, we don't do passive healthchecks so there's no restarting
wait so those health checks are only for the first 5 or so seconds after the deploy goes live to ensure that the app has started?
a year ago
yes exactly
a year ago
what?
a year ago
Isn’t it still weird that my manual restarts sometimes don’t work though?
a year ago
I’ll try (1)
a year ago
For process exit
a year ago
But it still doesn’t quite explain why manual restarts don’t work
a year ago
what makes you say manual restarts dont work?
a year ago
I’m clicking restart and my script doesn’t budge
a year ago
that's not really conclusive evidence unfortunately
a year ago
my script logs on startup
a year ago
It isn’t restarting
a year ago
Not sure how else to show it
a year ago
we would need a minimal reproducible example with steps to reproduce
a year ago
Ok, I can look into that
a year ago
it needs to be a crashing code. I have done this before so it needs to be process.exit(1)
a year ago
it should just restart itself (sometimes it takes a few seconds)
a year ago
if not what i normlaly do is to trigger a redeploy through the Dashboard or just git commit --allow-empty lol
a year ago
it's like y'all don't even know my template exists -
a year ago
I didn’t 🥲
a year ago
does it work for your needs?
