4
  • Serving Flask app "server" (lazy loading)
    • Environment: production WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
    • Debug mode: on
    • Running on http://0.0.0.0:9002/ (Press CTRL+C to quit)
    • Restarting with stat
    • Debugger is active!
    • Debugger PIN: 314-390-242 Exception in thread Thread-1: Traceback (most recent call last): File "/home/user/Downloads/yes/envs/emotionservice/lib/python2.7/threading.py", line 801, in __bootstrap_inner self.run() File "/home/user/Downloads/yes/envs/emotionservice/lib/python2.7/threading.py", line 754, in run self.__target(*self.__args, **self.__kwargs) File "/home/user/Downloads/yes/envs/emotionservice/lib/python2.7/site-packages/werkzeug/serving.py", line 963, in inner fd=fd, File "/home/user/Downloads/yes/envs/emotionservice/lib/python2.7/site-packages/werkzeug/serving.py", line 803, in make_server raise ValueError("cannot have a multithreaded and multi process server.") ValueError: cannot have a multithreaded and multi process server.

2 Answers 2

6

it solved. set threaded=True processes=1

Sign up to request clarification or add additional context in comments.

Comments

1

If you want to use flask in multiprocessing mode (processes > 1). include threaded=False, otherwise it throws same error.

app.run(host=addr, port=port, threaded=False, processes=50)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.