Giter VIP home page Giter VIP logo

Comments (13)

maxgacrux avatar maxgacrux commented on June 15, 2024 1

@danihodovic I turned on the debug mode and made sure that all metrics are sent, except for task activity

from celery-exporter.

kosyan62 avatar kosyan62 commented on June 15, 2024 1

Hello there!
I met the same problem and spent some time analyzing it. It seems that the only place where
celery_worker_tasks_active updating is on the worker_heartbeat event from celery. @maxgacrux do you use --without heartbeat? Disabling it (enabling heartbeat for worker) should do the trick.

from celery-exporter.

danihodovic avatar danihodovic commented on June 15, 2024

Have you enabled worker_send_task_events in your app?

https://docs.celeryq.dev/en/stable/userguide/configuration.html#worker-send-task-events

from celery-exporter.

maxgacrux avatar maxgacrux commented on June 15, 2024

@danihodovic Hey! thank you for the quick reply. yes, I have included in the application what you say. but I still don't get what I want. i use fastapi with celery

celery.conf.task_send_sent_event = True

from celery-exporter.

maxgacrux avatar maxgacrux commented on June 15, 2024

@danihodovic maybe the problem is that I'm using workers with gpu?

command: celery worker --app=app.worker.celery -P solo --loglevel=info -Q main_task -n worker1

from celery-exporter.

danihodovic avatar danihodovic commented on June 15, 2024

I don't think that should be a problem. Increase the log level of the celery-worker and see if it's logging anything interesting.

from celery-exporter.

maxgacrux avatar maxgacrux commented on June 15, 2024

@danihodovic how to enlarge the magazine?

from celery-exporter.

danihodovic avatar danihodovic commented on June 15, 2024

https://github.com/danihodovic/celery-exporter/blob/master/src/cli.py#L56

Either export an environment variable

export CE_LOG_LEVEL=DEBUG
./celery-exporter

or use a command line argument

./celery-exporter --log-level=DEBUG

from celery-exporter.

maxgacrux avatar maxgacrux commented on June 15, 2024

@danihodovic I also noticed that from time to time celery-exporter gives out non-existent hostnames. here is an example:

celery_task_started_created{hostname="435ab5a1d257",name="create_task"} 1.667807616992973e+09
celery_task_started_created{hostname="worker",name="create_task"} 1.6678076170305264e+09

even though I gave my worker a name:

command: celery worker --app=worker.celery --loglevel=info -Q default -n worker

from celery-exporter.

danihodovic avatar danihodovic commented on June 15, 2024

Are you sure you're running a single worker? The exporter reads the hostname from the celery events.

from celery-exporter.

maxgacrux avatar maxgacrux commented on June 15, 2024

@danihodovic yes, I am absolutely sure of it. above is the command i use in my docker-compose.yml

from celery-exporter.

maxgacrux avatar maxgacrux commented on June 15, 2024

@danihodovic the only moment I see now is the launch of flower. can there be problems because of this?

command: flower --app=worker.celery --port=5555 --broker=pyamqp://guest:guest@rabbitmq:5672/ --broker_api=http://guest:guest@rabbitmq:15672/api/vhost

from celery-exporter.

danihodovic avatar danihodovic commented on June 15, 2024

I'm not running flower so it's hard to tell

from celery-exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.