Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve this error? "RestartFreqExceeded: 5 in 1s" in django+celery+rabbitmq+mysql+redis

So I am using django with celery. rabbitmq is the broker. redis is the cache. mysql is the db. (everything in localhost)

  1. I am using python2.7 and using virtualenv based virtual environment
  2. I start the redis server (local) at default port
  3. In a new terminal, I run

    python manage.py runserver
    
  4. In a new terminal I start celery like so

    celery -A ds_django worker -B -l warning
    

And this procedure used to work. But now when I run the celery command, I get the following

    [2016-07-12 09:15:20,113: CRITICAL/MainProcess] Frequent restarts detected: RestartFreqExceeded('5 in 1s',)
    Traceback (most recent call last):
        File "/Users/user/Desktop/ds-django/ds_django/newDs/lib/python2.7/site- packages/celery/worker/consumer.py", line 285, in start
            self._restart_state.step()
        File "/Users/user/Desktop/ds-django/ds_django/newDs/lib/python2.7/site-packages/billiard/common.py", line 130, in step
            raise self.RestartFreqExceeded("%r in %rs" % (R, self.maxT))
     RestartFreqExceeded: 5 in 1s

I have absolutely no clue why this is happening or how to fix this. I have searched Google and StackOverFlow over and over again, but no use.

One reason why I think it might have happened is, sometime back I had run 4 celery workers at-a-time and then cold-shut them all down. Maybe because of that it is saying restart frequency exceeded, but not sure. And no idea how to fix this. Probably some config file setting, but which setting and where also no clue.

If any other info is required, I will provide. Any help is appreciated. Thank you.

like image 918
TheRajVJain Avatar asked Jul 12 '16 04:07

TheRajVJain


1 Answers

To answer your question, Your RabbitMQ is down due to that consumer started to reconncet and it went to contineous loop and it created an exception RestartFreqExceeded. Please try starting your RabbitMQ server and run your celery.

like image 96
backtrack Avatar answered Sep 28 '22 17:09

backtrack