Active Deployment: No Logs & 502 Error
0xmstore
PROOP

a year ago

facing an issue with Project ID 5176d6ce-2430-490e-a7fe-936dd3567b94. My latest deployment shows 'Active' but has no Build or Deploy logs appearing. The application is unreachable (502 error). This started after recent commits modifying railway.toml (cronCommand). Tried clearing the build cache and redeploying, but the issue persists. Any ideas what might be causing the logs to be missing? Thanks!

8 Replies

a year ago

Hello,

Cron jobs should not be running web services, can you share more about your use case?


0xmstore
PROOP

a year ago

Thanks for the quick reply! My use case isn't running a web service via cron. I'm trying to run a simple Django management command (python manage.py deleteoldfiles) for periodic cleanup (deleting old files) on the schedule defined in the UI (0 3 * * *).
I added cronCommand = "python manage.py deleteoldfiles" to my railway.toml's [deploy] section, following what seemed like the standard approach. Is there a different or recommended way to schedule a standalone management command like this on Railway, perhaps separate from the main web service definition? The 502 errors and lack of logs started after adding this command and the cron config.


a year ago

My use case isn't running a web service via cron

It has a domain?


0xmstore
PROOP

a year ago

ah yes, the service has the ledgerize.ai domain attached because it runs the main Django web application using the startCommand (gunicorn …).
The cronCommand (python manage.py deleteoldfiles) was intended just to run that specific cleanup task on the defined schedule, separate from the web serving.


a year ago

You would want to run the site and cron job as two separate Railway services


0xmstore
PROOP

a year ago

ah i see


0xmstore
PROOP

a year ago

is there a place i could input a Cron Command? cant seem to find it @Brody


a year ago

it would be the start command


Loading...