Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly disable threading when running the Flask app. #65

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Explicitly disable threading when running the Flask app. #65

wants to merge 1 commit into from

Conversation

andrej-peterka
Copy link

Flask 1.0+ enables threading by default. Disable it to make sure the
latest version of flask works.

WIthout this fix, I get the error:

root@localhost:~$ /opt/youtube-dl/bin/youtube-dl-server
 * Serving Flask app "youtube_dl_server.app" (lazy loading)
 * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: off
Traceback (most recent call last):
  File "/opt/youtube-dl/bin/youtube-dl-server", line 11, in <module>
    sys.exit(main())
  File "/opt/youtube-dl/local/lib/python2.7/site-packages/youtube_dl_server/server.py", line 48, in main
    app.run(args.host, args.port, processes=args.number_processes)
  File "/opt/youtube-dl/local/lib/python2.7/site-packages/flask/app.py", line 943, in run
    run_simple(host, port, self, **options)
  File "/opt/youtube-dl/local/lib/python2.7/site-packages/werkzeug/serving.py", line 814, in run_simple
    inner()
  File "/opt/youtube-dl/local/lib/python2.7/site-packages/werkzeug/serving.py", line 774, in inner
    fd=fd)
  File "/opt/youtube-dl/local/lib/python2.7/site-packages/werkzeug/serving.py", line 656, in make_server
    raise ValueError("cannot have a multithreaded and "
ValueError: cannot have a multithreaded and multi process server.

Flask 1.0+ enables threading by default. Disable it to make sure the
latest version of flask works.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant