title: Django TimeLimitExceeded error
body: <p>Today I got an error email from Celery, can someone explain it and possibly how I can fix the timeout issue? It would be very helpful, Thank you.</p>
  
  <p>PS my message seems to have sent despite this error, is that also right?</p>
  
  <p><strong>Error:</strong></p>
  
  <pre><code>Task Request to Process with id 65123935-b190-4718-9ed0-fb863359f27f 
   raised exception:
  'TimeLimitExceeded(300.0,)'
  
  
  Task was called with args: (&lt;Batch: Batch object&gt;,) kwargs: {}.
  
  The contents of the full traceback was:
  
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/billiard/pool.py", line 496, in on_hard_timeout
      raise TimeLimitExceeded(job._timeout)
  TimeLimitExceeded: TimeLimitExceeded(300.0,)
  
  
  --
  Just to let you know,
  py-celery at w1.ip-10-32-53-113.
  </code></pre>
  
  <p><strong>Task:</strong></p>
  
  <pre><code>class ProcessRequests(Task):
      name = "Request to Process"
      max_retries = 1
      default_retry_delay = 3
  
      def run(self, batch):
          # Only run this task on non-scheduled tasks
          if batch.status != "Scheduled":
              q = Contact.objects.filter(contact_owner=batch.user)
              if batch.group == None:
                  q = q.filter(id=batch.contact_id)
              else:
                  q = q.filter(group=batch.group)
  
              for e in q:
                  msg = Message.objects.create(
                      recipient_number=e.mobile,
                      content=batch.content,
                      sender=e.contact_owner,
                      billee=batch.user,
                      sender_name=batch.sender_name
                  )
                  gateway = Gateway.objects.get(pk=2)
                  msg.send(gateway)
  </code></pre>