Waitress is meant to be a production-quality pure-Python WSGI server with very acceptable performance.
Questions tagged [waitress]
190 questions
6
votes
1 answer
Logging with command line waitress-serve
Is there a way to log waitress-serve output into a file?
The current command I use is:
waitress-serve --listen=localhost:8080 --threads=1 my_app_api:app
The application we used was not written with waitress in mind earlier, so we choose to serve…

Muhammad Ali
- 712
- 7
- 14
6
votes
0 answers
Waitress causing 504s from too many connections
We have an application that is getting 20-30 requests a second. Waitress seems to be buckling under the load despite us tweaking performance vars. It doesn't crash nor give any errors. Instead, it seems to send (we assume) a ERRCONRESET to Nginx…

CogitoErgoSum
- 2,879
- 5
- 32
- 45
5
votes
3 answers
"ValueError: Invalid async_mode specified" when bundling a Flask app using cx_Freeze
I am building an API that uses Waitress, Flask, and Flask_SocketIO in Windows. Everything works fine from the command line, but when I try to bundle my API into an .exe using cx_Freeze and then run it, I get the error:
ValueError: Invalid async_mode…

Brian
- 5,826
- 11
- 60
- 82
5
votes
2 answers
"module object not callable" with Waitress
I am trying to deploy my app on Heroku. I have to use Windows, and gunicorn won't work. I tried waitress, which keeps giving me a "module not callable" error whenever I try to load any page.
Note: I haven't deployed it on web so far, was trying…

hungryhippo
- 83
- 1
- 7
5
votes
2 answers
Pyramid gunicorn and waitress
I'm trying to understand the behaviour of Pyramid regarding the [main:server] configuration and gunicorn.
If I use pserve, it'll use the configuration of [main:server], for both waitress and gunicorn. For example:
# development.ini…

yami
- 71
- 5
5
votes
2 answers
Using `waitress` to serve a Django app on multiple ports
I'm using waitress to serve my Django app. I need it to serve the app on two ports simultaneously, in the same thread. (Can't be on a separate process because I need to be able to run it in my debugger in development.)
How can I do that?

Ram Rachum
- 84,019
- 84
- 236
- 374
5
votes
0 answers
Pserve Command Not Working
I'm new to Python, and am developing a test application using the Pyramid Framework.
Today, for reasons unclear, the pserve command used to start the waitress server stopped functioning. Running: pserve development.ini results in the message:…

bibs
- 1,226
- 2
- 11
- 14
4
votes
1 answer
How to run waitress for a socket.io server without flask in Windows?
Am using Windows 11 and I wish to run a python socket.io server. gunicorn being incompatible with Windows, I tried using waitress to run my server using the following command waitress-serve --listen=*:8000 app:pysock and it throwed me the following…

Pervez
- 391
- 1
- 10
4
votes
1 answer
How to adjust timeout for python app served with waitress
I am running a flask application which has an option in the UI where the user can click a button and it calls an endpoint to perform some analysis.
The application is served as follows:
from waitress import serve
serve(app, host="0.0.0.0",…

KSync
- 51
- 6
4
votes
0 answers
How to get logger.info of Flask app in Waitress in windows?
I have the flask app serving in waitress in windows, I have logger info
app = Flask(__name__)
logging.basicConfig(level=logging.ERROR)
@app.route('/run', methods=['POST'])
def RunFunction():
…………codes...……..
app.logger.info("Log 1: Starting…

hanzgs
- 1,498
- 17
- 44
4
votes
1 answer
Flask in production with Caddy and Waitress url_for redirect to localhost
I have a Flask server running on a Windows EC2 instance.
I need to have it using https protocol, so my setup is like this :
I have a Caddy server
I use Waitress to run my flask app
Here is my config for Caddy :
example.com:443{
proxy /…

ZazOufUmI
- 3,212
- 6
- 37
- 67
4
votes
2 answers
waitress command line returning "Malformed Application" when deploying flask web app
I'm attempting to deploy a simple web app, and I'm using command line waitress-serve --call command. But every time, the command immediately returns 1. Malformed application 'name_of_project_here'.
Here's my flask web app in python:
from flask…

Amin
- 908
- 1
- 11
- 23
4
votes
2 answers
python waitress as a windows service
I wrote an API server using waitress and falcon on windows. It's working great but now I need to run it as service so it monitorable. What's the best way to do this? I've looked at pywin32 and cherrypy's own implementation. I get stumped on on…

Anthony Scudese
- 41
- 1
- 2
3
votes
0 answers
How to serve Flask app on waitress and socket.io using eventlet server simultaneously?
I'm using waitress server to deploy the flask app for production. I'm also using flask's socketio along with the eventlet server which requires its own app run.
Currently only serving app on waitress:
serve(app, host='0.0.0.0', port=8080)
How do I…

Liz
- 31
- 3
3
votes
1 answer
Unable to connect to local server on WSL2 from Windows host
I have a Python3 project using waitress to serve on localhost on WSL2/Ubuntu 20. I start the server from VSCode remote but I can't connect to it from a browser on Windows using address http://127.0.0.1:5998 or http://localhost:5998, getting unable…

dstr
- 8,362
- 12
- 66
- 106