Skip to content

Explicitly disable threading when running the Flask app.#65

Open
andrej-peterka wants to merge 1 commit intojaimeMF:masterfrom
andrej-peterka:flask-1
Open

Explicitly disable threading when running the Flask app.#65
andrej-peterka wants to merge 1 commit intojaimeMF:masterfrom
andrej-peterka:flask-1

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