Skip to content

Commit

Permalink
Restart the mojo worker every 2000 requests (#1046)
Browse files Browse the repository at this point in the history
To avoid the worker growing memory usage we restart it after 200*10
requests and give it a lot of time to finish requests. Mojolocious 7.10
has a bug, that during restart it will still accept more requests from
apache, so we need to limit the number of requests accepted (-r)
and give the restart enough time to finish all of them (-G).

This bug caused several sudden deaths in uploads, e.g. see
https://progress.opensuse.org/issues/13876
  • Loading branch information
coolo committed Nov 29, 2016
1 parent 663c025 commit 2ebaab0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion systemd/openqa-webui.service
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Requires=openqa-scheduler.service openqa-websockets.service
User=geekotest
Environment="DBUS_STARTER_BUS_TYPE=system"
# Our API commands are very expensive, so the default timeouts are too tight
ExecStart=/usr/share/openqa/script/openqa prefork -m production --proxy -i 100 -H 400 -w 10
# for the meaning of -a -G and -r, check https://progress.opensuse.org/issues/13876
ExecStart=/usr/share/openqa/script/openqa prefork -m production --proxy -i 100 -H 400 -w 10 -a 100 -G 1000 -r 20

[Install]
WantedBy=multi-user.target

0 comments on commit 2ebaab0

Please sign in to comment.