Questions tagged [waitress]

Waitress is meant to be a production-quality pure-Python WSGI server with very acceptable performance.

190 questions
28
votes
8 answers

Serving Flask app with waitress on windows

I am able to run a webserver using the following code from flask import Flask from waitress import serve app = Flask(__name__, static_url_path='/static') ... serve(app, port=8080) The problem is that I can access it only from the machine where it…
llulai
  • 627
  • 1
  • 6
  • 9
18
votes
2 answers

How does Waitress handle concurrent tasks?

I'm trying to build a python webserver using Django and Waitress, but I'd like to know how Waitress handles concurrent requests, and when blocking may occur. While the Waitress documentation mentions that multiple worker threads are available, it…
evantkchong
  • 2,251
  • 3
  • 14
  • 29
14
votes
4 answers

How to find the cause of "task queue depth" warnings from waitress?

Is there a recommended way to diagnose the cause of task queue depth warnings like the one below from waitress? Perhaps there is some way to log queued tasks / requests? 2019-04-25 14:45:23,048 WARNI [waitress.queue:122][MainThread] Task queue…
benvc
  • 14,448
  • 4
  • 33
  • 54
13
votes
1 answer

How to exit cleanly from Flask and 'waitress' running as a Windows pywin32 service

I have managed to cobble together a working demo of a pywin32 Windows service running Flask inside the Pylons waitress WSGI server (below). A niece self contained solution is the idea... I have spent hours reviewing and testing ways of making…
Alias_Knagg
  • 886
  • 1
  • 7
  • 21
11
votes
2 answers

Is Gunicorn's gthread async worker analogous to Waitress?

I've read some posts from 2013 that the Gunicorn team was planning to build a threaded buffering layer worker model, similar to how Waitress works. Is that what the gthread async worker does? The gthread workers were released with version 19.0 in…
Ben Simmons
  • 1,858
  • 3
  • 21
  • 31
11
votes
5 answers

Waitress on Heroku giving error

I am trying to switch from Gunicorn to Waitress on Heroku. In the logs, I keep getting an error from Waitress: Error: Bad module 'cardisle' In my procfile, I have: web: waitress-serve --port=$PORT cardisle.wsgi:application If I remove the .wsgi…
Kinetic Stack
  • 788
  • 12
  • 33
10
votes
2 answers

How to set up logging for a Python Pyramid Waitress server?

I am trying to setup logging for a Python Pyramid Waitress Server. I have followed the docs here: Pyramid logging and here: Pyramid PasteDeploy logging. I have tired both methods which have yield no logging results from waitress. My own logging…
fat fantasma
  • 7,483
  • 15
  • 48
  • 66
9
votes
1 answer

Waitress and GUnicorn large data input is much slower than Flask development server

Problem description I am trying to create a Flask app that should: Be visible on localhost only, so no network slowdown Get quite a lot of data (30MB as a large numpy array) as input and output a relatively smaller amount of data (around…
Marco Spinaci
  • 1,750
  • 15
  • 22
9
votes
2 answers

How to change and reload python code in waitress without restarting the server?

I am using waitress to serve the web application content like. waitress-serve --port=8000 myapp:application While developing, as I change code, I continuously had to restart the waitress-serve to see my changes. Is there a standard way I can…
Ashok Bommisetti
  • 314
  • 1
  • 3
  • 15
9
votes
1 answer

I can not connect to https waitress wsgi server

I have tried the tutorial of python pyramid framework but, https connection, no matter how able to waitress. http://docs.pylonsproject.org/projects/pyramid/en/latest/tutorials/wiki2/installation.html If you look at the documents of waitress, there…
user2897065
  • 95
  • 1
  • 1
  • 4
8
votes
1 answer

Gracefully stopping Waitress web server

I am spinning up a Waitress web server in a background thread to run functional tests. How it is possible to clean up and quit waitress at the end of test run in clean(ish) manner? The public waitress API gives only one way entry point which expects…
Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
7
votes
2 answers

Logging requests to a file with Waitress, Flask and Python

I need log http-requests to a file in a Waitress server running a Flask application. I wanted to separate the Flask app from the server so I created a file myapp_waitress.py from myflaskapp import app from waitress import serve from…
tok
  • 909
  • 1
  • 10
  • 21
7
votes
1 answer

Falcon through Waitress on Windows OS

i've started making an API using Falcon on Ubuntu and I've been using gunicorn to test it but I also want to try developing it on Windows too. As we know gunicorn doesn't work on Windows yet so I will have to use another server that can run wsgi.…
Nick
  • 545
  • 12
  • 31
6
votes
1 answer

Serving Flask app with waitress on windows using SSL public/private key

How do I run my Flask app which uses SSL keys using waitress. The SSL context is specified in my Flask's run() as in app.run(ssl_context=('cert.pem', 'key.pem')) But app.run() is not used when using waitress as in the code…
Morey
  • 549
  • 7
  • 10
6
votes
2 answers

How to debug (500) Internal Server Error on Python Waitress server?

I'm using Python and Flask, served by Waitress, to host a POST API. I'm calling the API from a C# program that posts data and gets a string response. At least 95% of the time, it works fine, but sometimes the C# program reports an error: (500)…
user3450049
  • 825
  • 1
  • 10
  • 20
1
2 3
12 13