title: Django Celery Error When Starting CeleryBeat - Cannot Add Item To Database
body: <p>I've set up a Django project through Apache using mod_wsgi, and I'm now trying to add django-celery to the mix to run periodic and scheduled tasks.  I'm running into occasional error messages, though, but I haven't found an explanation for what they mean.</p>
  
  <p>When I start up Celerybeat using:</p>
  
  <pre><code>./manage.py celery beat
  </code></pre>
  
  <p>I often get one of the two following errors:</p>
  
  <pre><code>Message Error: cannot add item to database
  
  celerybeat raised exception &lt;class 'dbm.error'&gt;: error('cannot add item to database',)
  </code></pre>
  
  <p>I can see that celerybeat generates two files in the project directory: celerybeat-schedule.dir and celerybeat-schedule.pag.  I'm pretty sure these files are the "database" mentioned in the error message.  If I delete these files, Celerybeat will usually run without problems for a couple times, but then the errors come back.</p>
  
  <p>Is there something that I need to do with the celerybeat-schedule files to avoid this error?  I thought it might be a permissions issue, but I couldn't see any issues.</p>