problems with workers in django app
I have a problem with the workers, after days they go offline, then I restart my app and they are online again
Solution:Jump to solution
then this is an issue with the code or config, please add better logging so you can narrow down by the worker is exiting
17 Replies
Project ID:
N/A
are there any error logs?
nope the last log
24-07-08 15:06:56,299: WARNING/ForkPoolWorker-5] Producto MLC1499816993 está under_review.
[2024-07-08 15:06:56,302: WARNING/ForkPoolWorker-4] Updated link ID 8387: Order ID MK23PDMNF8 to status approved.
[2024-07-08 15:06:56,526: WARNING/ForkPoolWorker-4] Updated link ID 4616: Order ID MK7KS80RR4 to status approved.
[2024-07-08 15:06:56,604: WARNING/ForkPoolWorker-5] Updated link ID 6998: Order ID MKJB96Y8N5 to status approved.
[2024-07-08 15:06:56,831: WARNING/ForkPoolWorker-4] Updated link ID 4583: Order ID MKX6TE3O4R to status approved.
[2024-07-08 15:06:57,236: WARNING/ForkPoolWorker-5] Updated link ID 7679: Order ID MK4X5X2RQL to status approved.
[2024-07-08 15:06:57,243: WARNING/ForkPoolWorker-4] Updated link ID 4662: Order ID MKQZ0CAP1G to status approved.
Stopping Container
I put this in settings
CELERY_BROKER_URL = os.environ["REDIS_URL"]
CELERY_RESULT_BACKEND = os.environ["REDIS_URL"]
CELERY_ACCEPT_CONTENT = ['json']
CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'
CELERY_TIMEZONE = 'UTC'
CELERY_WORKER_MAX_TASKS_PER_CHILD = 100 # Reiniciar el worker después de 100 tareas
CELERY_TASK_ACKS_LATE = True # Acknowledge las tareas tarde para evitar la pérdida de tareas
CELERY_WORKER_PREFETCH_MULTIPLIER = 1 # Controlar la cantidad de tareas que un worker puede prefetchear
CELERY_TASK_TIME_LIMIT = 3600 # Limitar el tiempo de ejecución de una tarea a 1 hora
but i dont know if its necesary
what do the memory metrics look like
Network egress
only has a big pick
I'm sorry but that doesn't answer the question
and
Disk usage
hi?
since upgrading to the hobby plan have you redeployed the worker service?
how do I do that
has the service for your worker redeployed since you have upgraded to the hobby plan
yes mm I think so because i use github so in the week I am up changes commits
so when i put a new commits all the services are redeploying
Solution
then this is an issue with the code or config, please add better logging so you can narrow down by the worker is exiting
mm how i do that
im sorry but we are not able to offer coding assistance here
thx i will try with code so