Is it possible to configure uwsgi to kill workers with broken pipes?
The reason:
– we are using server-sent events (events are form a pubsub service);
– when client disconnects, there is no way to terminate the subscription, and the server process writes to uWSGI, which tries to write to a closed connection.Until we find a way to gracefully terminate subscriptions, we are looking for a workaround by killing that workers.
Answer
Since uWSGI 1.4 every request is interrupted on write errors (an I/O exception is injected too)
Maybe you are using an old uWSGI version
Attribution
Source : Link , Question Author : saabeilin , Answer Author : roberto