Skip to content

Commit

Permalink
uwsgi: enable keep-alive support
Browse files Browse the repository at this point in the history
Enable support for keep-alive in uWSGI's configuration. This fixes an
issue with Traefik sporadically returning 500 or 502 status codes, with
logs reporting errors such as `http: server closed idle connection` and
`write: broken pipe`.

See
https://uwsgi-docs.readthedocs.io/en/latest/HTTP.html#http-keep-alive
for more information about keep-alive in uWSGI.
  • Loading branch information
mdonadoni committed Jan 23, 2023
1 parent dd936ea commit 11f34f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion helm/reana/templates/uwsgi-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ data:
uwsgi.ini: |
[uwsgi]
stats = /tmp/stats.socket
http-socket = 0.0.0.0:5000
http = 0.0.0.0:5000
module = invenio_app.wsgi:application
master = true
processes = {{ .Values.components.reana_server.uwsgi.processes }}
Expand Down Expand Up @@ -41,3 +41,6 @@ data:
die-on-term = true
hook-master-start = unix_signal:2 gracefully_kill_them_all
hook-master-start = unix_signal:15 gracefully_kill_them_all
# enable keepalive to avoid 500/502 from traefik
http-keepalive = 1

0 comments on commit 11f34f0

Please sign in to comment.