Deploy flask using internal development server werkzeug

Why is it not recommended to use the flask / werkzeug backend web server ? What problems can arise?

I ask because at work I am being forced to do this and use make shift cron to restart the service every day!

+3


source to share


2 answers


If you need to use a cron job for daily and daily reboots, you've already found a serious problem using the Flask development server. The development server is not written for stability, durability, configurability, security, speed, or most of anything other than convenience during development.



Setting up WSGI correctly will run faster, handle multiple connections correctly, and most importantly for you, periodically restart your application's process to clean up any torque that might arise.

+6


source


I had a network call inside a response handler that didn't have a timeout. Something went wrong and it waited for a while (I was using a module requests

) and then apparently never recovered.



Since the Werkzeug server had only one thread, the entire development server was completely unavailable.

0


source







All Articles