title: celery beat instantly stopping with resource error
body: <p>The logs of celery beat is like this where the last line just stopped and not continuing and recovering anymore.</p>
  
  <pre><code>[2018-08-20 11:20:59,002: INFO/MainProcess] Scheduler: Sending due task check result delays every 10sec (notify_delay)
  [2018-08-20 11:21:00,000: INFO/MainProcess] Scheduler: Sending due task load abnormal schedules (load_abnormal_schedules)
  [2018-08-20 11:21:00,004: INFO/MainProcess] Scheduler: Sending due task check close schedule every 5sec (close_schedule)
  [2018-08-20 11:21:05,000: INFO/MainProcess] Scheduler: Sending due task check close schedule every 5sec (close_schedule)
  [2018-08-20 11:21:10,000: INFO/MainProcess] Scheduler: Sending due task check close schedule every 5sec (close_schedule)
  [2018-08-20 11:21:14,002: INFO/MainProcess] Scheduler: Sending due task check result delays every 10sec (notify_delay)
  [2018-08-20 11:21:15,000: INFO/MainProcess] Scheduler: Sending due task load abnormal schedules (load_abnormal_schedules)
  [2018-08-20 11:21:15,003: INFO/MainProcess] Scheduler: Sending due task check close schedule every 5sec (close_schedule)
  [2018-08-20 11:21:20,000: INFO/MainProcess] Scheduler: Sending due task check close schedule every 5sec (close_schedule)
  [2018-08-20 11:21:25,000: INFO/MainProcess] Scheduler: Sending due task check close schedule every 5sec (close_schedule)
  [2018-08-20 11:21:29,003: INFO/MainProcess] Scheduler: Sending due task check result delays every 10sec (notify_delay)
  </code></pre>
  
  <p>It is run inside a docker container. When I checked via top it shows a high CPU percentage</p>
  
  <pre><code>120549 root      20   0  356016 150144  16388 S  23.4  1.0   3:36.33 celery
  </code></pre>
  
  <p>Then when I ssh inside container and try to the celery beat command. The error below initially returned </p>
  
  <pre><code>root@4a298cc9c6e2:/usr/src/app# celery -A ghost beat -l info --pidfile=
  celery beat v4.2.0 (windowlicker) is starting.
  
  __    -    ... __   -        _
  LocalTime -&gt; 2018-08-20 11:32:51
  Configuration -&gt;
      . broker -&gt; amqp://ghost:**@ghost-rabbitmq:5672/ghost
      . loader -&gt; celery.loaders.app.AppLoader
      . scheduler -&gt; celery.beat.PersistentScheduler
      . db -&gt; celerybeat-schedule
      . logfile -&gt; [stderr]@%INFO
      . maxinterval -&gt; 5.00 minutes (300s)
  [2018-08-20 11:32:51,526: INFO/MainProcess] beat: Starting...
  [2018-08-20 11:32:51,535: ERROR/MainProcess] Removing corrupted schedule file 'celerybeat-schedule': error(11, 'Resource temporarily unavailable')
  Traceback (most recent call last):
    File "/usr/local/lib/python3.6/site-packages/kombu/utils/objects.py", line 42, in __get__
      return obj.__dict__[self.__name__]
  KeyError: 'scheduler'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/usr/local/lib/python3.6/site-packages/celery/beat.py", line 476, in setup_schedule
      self._store = self._open_schedule()
    File "/usr/local/lib/python3.6/site-packages/celery/beat.py", line 466, in _open_schedule
      return self.persistence.open(self.schedule_filename, writeback=True)
    File "/usr/local/lib/python3.6/shelve.py", line 243, in open
      return DbfilenameShelf(filename, flag, protocol, writeback)
    File "/usr/local/lib/python3.6/shelve.py", line 227, in __init__
      Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback)
    File "/usr/local/lib/python3.6/dbm/__init__.py", line 94, in open
      return mod.open(file, flag, mode)
  _gdbm.error: [Errno 11] Resource temporarily unavailable
  </code></pre>
  
  <p>Take note that I'm only using pure celery and not django-celery-beat</p>