title: Gunicorn worker periodically crashes: 'socket is not registered'
body: <p>Time to time (once a several hours) gunicorn worker fails with the following error:</p>
  
  <pre><code>[2014-10-29 10:21:54 +0000] [4902] [INFO] Booting worker with pid: 4902
  [2014-10-29 13:15:24 +0000] [4902] [ERROR] Exception in worker process:
  Traceback (most recent call last):
    File "/opt/test/env/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 507, in spawn_worker
      worker.init_process()
    File "/opt/test/env/local/lib/python2.7/site-packages/gunicorn/workers/gthread.py", line 109, in init_process
      super(ThreadWorker, self).init_process()
    File "/opt/test/env/local/lib/python2.7/site-packages/gunicorn/workers/base.py", line 120, in init_process
      self.run()
    File "/opt/test/env/local/lib/python2.7/site-packages/gunicorn/workers/gthread.py", line 177, in run
      self.murder_keepalived()
    File "/opt/test/env/local/lib/python2.7/site-packages/gunicorn/workers/gthread.py", line 149, in murder_keepalived
      self.poller.unregister(conn.sock)
    File "/opt/test/env/local/lib/python2.7/site-packages/trollius/selectors.py", line 408, in unregister
      key = super(EpollSelector, self).unregister(fileobj)
    File "/opt/test/env/local/lib/python2.7/site-packages/trollius/selectors.py", line 243, in unregister
      raise KeyError("{0!r} is not registered".format(fileobj))
  KeyError: '&lt;socket._socketobject object at 0x7f823f454d70&gt; is not registered'
  ...
  ...
  [2014-10-29 13:15:24 +0000] [4902] [INFO] Worker exiting (pid: 4902)
  [2014-10-29 13:15:24 +0000] [5809] [INFO] Booting worker with pid: 5809
   ...
  </code></pre>
  
  <p>Configuration:</p>
  
  <pre><code>bind = '0.0.0.0:80'
  workers = 1
  threads = 4
  debug = True
  reload = True
  daemon = True
  </code></pre>
  
  <p>I'm using:</p>
  
  <pre><code>Python 2.7.6
  gunicorn==19.1.1
  trollius==1.0.2
  futures==2.2.0
  </code></pre>
  
  <p>Any ideas what may be the cause and how to fix that?</p>
  
  <p>Thanks!</p>