Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8716197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:01:21+00:00 2026-06-13T06:01:21+00:00

I’m attempting to use Celery with the RabbitMQ backend to run asynchronous background tasks

  • 0

I’m attempting to use Celery with the RabbitMQ backend to run asynchronous background tasks on Fedora, and I’m finding it frustratingly unreliable. The biggest problem is that it occasionally runs the identical task multiple times, and I’m having trouble diagnosing why.

I don’t think my code’s triggering the task multiple times, as I’ve tested by manually launching the task (which creates a db record) once, and see that two identical records are created. If I run the code from a Django shell, only one record is created, so the problem definitely seems to be Celery.

I have 3 servers each running celeryd, with only the first running rabbitmq, and all 3 servers share the same database. My first through was that there’s was a problem in my celery settings causing celeryd on each server to retrieve and execute the same task. However, nothing in the celery docs seems to differentiate between a single host and multi-host setup, so assuming I’ve specified the correct BROKER_HOST/PORT/USER/PASSWORD/VHOST in my settings.py for each server, it should “just work” with multiple hosts. Is this correct?

The other thought I had was that I might somehow be running multiple instances of celeryd, although I’m not sure how to check for this. Two servers are running Fedora 13, and when I run ps aux | grep .*.py I get:

root     24806  0.1  1.8  51404 31328 ?        Sl   Oct19   9:25 ../../.env/bin/python manage.py celeryd -f /var/log/myapp/celeryd.log -l WARNING --pidfile /var/run/celeryd.pid -B --scheduler djcelery.schedulers.DatabaseScheduler
root     24900  0.1  1.6  51404 28592 ?        S    Oct19   6:02 ../../.env/bin/python manage.py celeryd -f /var/log/myapp/celeryd.log -l WARNING --pidfile /var/run/celeryd.pid -B --scheduler djcelery.schedulers.DatabaseScheduler
root     24901  0.3  9.4 183232 161948 ?       S    Oct19  22:32 ../../.env/bin/python manage.py celeryd -f /var/log/myapp/celeryd.log -l WARNING --pidfile /var/run/celeryd.pid -B --scheduler djcelery.schedulers.DatabaseScheduler

Does this indicate that 3 separate instances of celeryd are running? And if so, is this an error and should I kill 2 of them?

My third server is running Fedora 17, which has a different services framework. When I run systemctl status celeryd.service I get:

celeryd.service - LSB: celery task worker daemon
      Loaded: loaded (/etc/rc.d/init.d/celeryd)
      Active: active (exited) since Fri, 19 Oct 2012 10:59:38 -0400; 4 days ago
     Process: 732 ExecStop=/etc/rc.d/init.d/celeryd stop (code=exited, status=0/SUCCESS)
     Process: 738 ExecStart=/etc/rc.d/init.d/celeryd start (code=exited, status=0/SUCCESS)
      CGroup: name=systemd:/system/celeryd.service

I’m not sure how to interpret this. “Active” usually it’s running, but “exited” usually means it’s not running. When I run ps aux | grep .*celery.* I only get:

root     25142  0.0  0.0 109400   932 pts/0    S+   11:28   0:00 grep --color=auto .*celery.*

So does this mean celeryd is not running, or should I be looking for something else?

Edit: Based on this answer, I think the 3 processes may be the default.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T06:01:22+00:00Added an answer on June 13, 2026 at 6:01 am

    I posted in the comments, but I’m convinced this is your problem, see here:

    root     24806  0.1  1.8  51404 31328 ?        Sl   Oct19   9:25 ../../.env/bin/python manage.py celeryd -f /var/log/myapp/celeryd.log -l WARNING --pidfile /var/run/celeryd.pid -B --scheduler djcelery.schedulers.DatabaseScheduler
    root     24900  0.1  1.6  51404 28592 ?        S    Oct19   6:02 ../../.env/bin/python manage.py celeryd -f /var/log/myapp/celeryd.log -l WARNING --pidfile /var/run/celeryd.pid -B --scheduler djcelery.schedulers.DatabaseScheduler
    root     24901  0.3  9.4 183232 161948 ?       S    Oct19  22:32 ../../.env/bin/python manage.py celeryd -f /var/log/myapp/celeryd.log -l WARNING --pidfile /var/run/celeryd.pid -B --scheduler djcelery.schedulers.DatabaseScheduler
    

    Your running celeryd with beat three times. So, your sending beat messages three times.

    You should either only one instance with beat on, or (preferably) run celerybeat on its own and take the -B off of the celeryd instances

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.