Assistance Needed with Django Celery Deployment on Railway - Preventing Automatic Stucking
Anonymous
FREEOP

2 months ago

Dear Support Team/Community,

I have deployed a Django application with Celery on Railway. My most recent deployment occurred on December 29, 2025. Following the deployment, the service functioned correctly from December 29 at 17:05 IST until December 31 at 13:30 IST. However, after that point, the service became stuck automatically.

Upon restarting the container on January 1, 2026, at 08:41 IST, the service resumed processing all jobs without issue(you can see this in attached screenshot).

Could you please advise on how to configure the Railway environment to prevent this from occurring in the future? Any recommendations on settings, such as worker options or resource allocations, or is this railway bug?

$10 Bounty

1 Replies

ilyassbreth
FREE

2 months ago

restart your worker and add this to your Celery start command:

bash

celery -A project_name worker --loglevel=info --max-tasks-per-child=50

yhis alone will prevent the hanging by recycling workers every 50 tasks, which prevents memory leaks and stuck connections from accumulating


Loading...