a year ago
One of my services runs on a schedule, and I can see its history in the dashboard. Normally, once it's done, I see that time it ran in a list of deployments, along with an indicator of success or failure.
One of the deployments is behaving oddly: it's indicator shows "running" status long after it completed (according to the logs). If click on it for the details, the indicator also says, "Removed" like it does for other completed runs. But the main dashboard shows an active "running" state with an ongoing timer -- just for that single deployment. The timer value is also odd -- it's neither the time since the actual start of the deployment nor the time since I loaded the page -- though it may actually be that coupled with a local cache, as it has reset several times.
Screenshot is at link below, you can also look into the deployment history of the linked project.
https://ltrubov.s3.us-west-1.amazonaws.com/images/railway-support-0.png
What's going on here? This specific service doesn't seem to be running correctly in other ways right now, and I want to know if to know if this is related so I can better debug it.
6 Replies
a year ago
Update: might be connected to another issue with the current deployment of the same service:
Deployment ID: b9106597-bbfa-4817-9302-a5236e221ea3
The logs basically repeat "Stopping container", "Stopping container", about every 5 minutes, sleeping in between -- and the actual code of the service never runs, with success or with failure.
a year ago
Can you share the thought process around enabling app sleeping? this is likely what has put the CRON job into a bad state.
a year ago
I'm not sure? I created this service by copying my main service (the two share code) which serves data via web requests (and thus should sleep when no clients are active and start upon connection), and made adjustments for the cronjob. The reason it's there is that the clients request a lot of data when they first connect, and generating that data out of the DB takes too long for a web request -- so I run this cron service to pre-generate and cache it.
It only runs on the cron, not due to the external connection. What will happen if I disable sleeping?
a year ago
There is no need for app sleeping, the job is already not running when its not running.
The service has been put into a bad state now, please recreate it without app sleeping.
a year ago
Thanks -- I've switched app sleeping off and redeployed, and it seems to work. However, the log of the old deployments still lists that continuously running state (just for that single deployment a2b9bbf6-034b-4234-982a-14fd78cbc992 ).
a year ago
Please see my last message, The service has been put into a bad state now, recreate it without app sleeping.
