title: Gunicorn error with running python eve server
body: <p>I'm running an API written in python and deployed in Eve server. Further, I'm trying to run with gunicorn(production). The command I have run is <code>gunicorn wsgi:app --preload -w 4 -b 0.0.0.0:7000</code> and it works as expected. Further, when we run this command we have to hit <code>Ctrl+s</code> for the workers to start running the same code. A <a href="https://stackoverflow.com/q/58757003/5658251">question</a> has already been asked with workers waiting indefinitely to start running using the preload option. However, I wanted to remove the preload option. So, when I run <code>gunicorn wsgi:app -w 4 -b 0.0.0.0:7000</code>, I get an error.</p>
  <pre><code> Use a production WSGI server instead.
   * Debug mode: off
   * Serving Flask app &quot;eve&quot; (lazy loading)
   * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
  [2020-07-14 14:26:40 +0530] [23780] [ERROR] Exception in worker process
  Traceback (most recent call last):
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/arbiter.py&quot;, line 583, in spawn_worker
  worker.init_process()
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/workers/base.py&quot;, line 119, in init_process
  self.load_wsgi()
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/workers/base.py&quot;, line 144, in load_wsgi
  self.wsgi = self.app.wsgi()
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/app/base.py&quot;, line 67, in wsgi
  self.callable = self.load()
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py&quot;, line 49, in load
  return self.load_wsgiapp()
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py&quot;, line 39, in load_wsgiapp
  return util.import_app(self.app_uri)
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/util.py&quot;, line 358, in import_app
  mod = importlib.import_module(module)
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/importlib/__init__.py&quot;, line 127, in import_module
  return _bootstrap._gcd_import(name[level:], package, level)
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1006, in _gcd_import
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 983, in _find_and_load
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 967, in _find_and_load_unlocked
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 677, in _load_unlocked
  File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 728, in exec_module
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 219, in _call_with_frames_removed
  File &quot;/root/Improved_ec/v2/improved_easy_credit/wsgi.py&quot;, line 4, in &lt;module&gt;
  app.run(host='0.0.0.0')
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/eve/flaskapp.py&quot;, line 222, in run
  super(Eve, self).run(host, port, debug, **options)
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/flask/app.py&quot;, line 990, in run
  run_simple(host, port, self, **options)
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/werkzeug/serving.py&quot;, line 1010, in run_simple
  inner()
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/werkzeug/serving.py&quot;, line 963, in inner
  fd=fd,
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/werkzeug/serving.py&quot;, line 806, in make_server
  host, port, app, request_handler, passthrough_errors, ssl_context, fd=fd
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/werkzeug/serving.py&quot;, line 699, in __init__
  HTTPServer.__init__(self, server_address, handler)
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/socketserver.py&quot;, line 452, in __init__
  self.server_bind()
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/http/server.py&quot;, line 137, in server_bind
  socketserver.TCPServer.server_bind(self)
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/socketserver.py&quot;, line 466, in server_bind
  self.socket.bind(self.server_address)
  OSError: [Errno 98] Address already in use
  [2020-07-14 14:26:40 +0530] [23797] [ERROR] Exception in worker process
  Traceback (most recent call last):
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/arbiter.py&quot;, line 583, in spawn_worker
  worker.init_process()
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/workers/base.py&quot;, line 119, in init_process
  self.load_wsgi()
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/workers/base.py&quot;, line 144, in load_wsgi
  self.wsgi = self.app.wsgi()
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/app/base.py&quot;, line 67, in wsgi
  self.callable = self.load()
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py&quot;, line 49, in load
  return self.load_wsgiapp()
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py&quot;, line 39, in load_wsgiapp
  return util.import_app(self.app_uri)
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/util.py&quot;, line 358, in import_app
  mod = importlib.import_module(module)
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/importlib/__init__.py&quot;, line 127, in import_module
  return _bootstrap._gcd_import(name[level:], package, level)
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1006, in _gcd_import
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 983, in _find_and_load
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 967, in _find_and_load_unlocked
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 677, in _load_unlocked
  File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 728, in exec_module
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 219, in _call_with_frames_removed
  File &quot;/root/Improved_ec/v2/improved_easy_credit/wsgi.py&quot;, line 4, in &lt;module&gt;
  app.run(host='0.0.0.0')
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/eve/flaskapp.py&quot;, line 222, in run
  super(Eve, self).run(host, port, debug, **options)
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/flask/app.py&quot;, line 990, in run
  run_simple(host, port, self, **options)
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/werkzeug/serving.py&quot;, line 1010, in run_simple
  inner()
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/werkzeug/serving.py&quot;, line 963, in inner
  fd=fd,
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/werkzeug/serving.py&quot;, line 806, in make_server
  host, port, app, request_handler, passthrough_errors, ssl_context, fd=fd
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/werkzeug/serving.py&quot;, line 699, in __init__
  HTTPServer.__init__(self, server_address, handler)
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/socketserver.py&quot;, line 452, in __init__
  self.server_bind()
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/http/server.py&quot;, line 137, in server_bind
  socketserver.TCPServer.server_bind(self)
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/socketserver.py&quot;, line 466, in server_bind
  self.socket.bind(self.server_address)
  OSError: [Errno 98] Address already in use
  [2020-07-14 14:26:40 +0530] [23780] [INFO] Worker exiting (pid: 23780)
  [2020-07-14 14:26:40 +0530] [23797] [INFO] Worker exiting (pid: 23797)
  [2020-07-14 14:26:40 +0530] [23796] [ERROR] Exception in worker process
  Traceback (most recent call last):
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/arbiter.py&quot;, line 583, in spawn_worker
  worker.init_process()
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/workers/base.py&quot;, line 119, in init_process
  self.load_wsgi()
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/workers/base.py&quot;, line 144, in load_wsgi
  self.wsgi = self.app.wsgi()
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/app/base.py&quot;, line 67, in wsgi
  self.callable = self.load()
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py&quot;, line 49, in load
  return self.load_wsgiapp()
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py&quot;, line 39, in load_wsgiapp
  return util.import_app(self.app_uri)
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/gunicorn/util.py&quot;, line 358, in import_app
  mod = importlib.import_module(module)
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/importlib/__init__.py&quot;, line 127, in import_module
  return _bootstrap._gcd_import(name[level:], package, level)
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1006, in _gcd_import
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 983, in _find_and_load
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 967, in _find_and_load_unlocked
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 677, in _load_unlocked
  File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 728, in exec_module
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 219, in _call_with_frames_removed
  File &quot;/root/Improved_ec/v2/improved_easy_credit/wsgi.py&quot;, line 4, in &lt;module&gt;
  app.run(host='0.0.0.0')
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/eve/flaskapp.py&quot;, line 222, in run
  super(Eve, self).run(host, port, debug, **options)
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/flask/app.py&quot;, line 990, in run
  run_simple(host, port, self, **options)
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/werkzeug/serving.py&quot;, line 1010, in run_simple
  inner()
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/werkzeug/serving.py&quot;, line 963, in inner
  fd=fd,
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/werkzeug/serving.py&quot;, line 806, in make_server
  host, port, app, request_handler, passthrough_errors, ssl_context, fd=fd
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/site-packages/werkzeug/serving.py&quot;, line 699, in __init__
  HTTPServer.__init__(self, server_address, handler)
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/socketserver.py&quot;, line 452, in __init__
  self.server_bind()
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/http/server.py&quot;, line 137, in server_bind
  socketserver.TCPServer.server_bind(self)
  File &quot;/root/anaconda3/envs/imp_ec/lib/python3.7/socketserver.py&quot;, line 466, in server_bind
  self.socket.bind(self.server_address)
  OSError: [Errno 98] Address already in use
  [2020-07-14 14:26:40 +0530] [23796] [INFO] Worker exiting (pid: 23796)
  [2020-07-14 14:27:10 +0530] [23776] [INFO] Shutting down: Master
  [2020-07-14 14:27:10 +0530] [23776] [INFO] Reason: Worker failed to boot.
  </code></pre>
  <p>Moreover, when I remove the `-w', the server launches as expected with a single worker.</p>
  <p>So, how do I fix this error with workers?</p>