Bug 912317 - uwsgi default configuration broken
Summary: uwsgi default configuration broken
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: uwsgi
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jorge Gallegos
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-18 11:57 UTC by Guido Berhoerster
Modified: 2013-10-15 06:38 UTC (History)
2 users (show)

Fixed In Version: uwsgi-1.9.17-2.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-15 06:38:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Guido Berhoerster 2013-02-18 11:57:20 UTC
The current default configuration currently starts a useless worker next to the
emperor. The workers pid is written to the given pidfile and incorrectly
considered the main process by systemd.  As a consequence systemd's reload
action will send a SIGHUP to the worker and not reload the emperor but kill the
worker and take down the emperor with it (see
http://lists.unbit.it/pipermail/uwsgi/2013-February/005392.html).
The fix to simply remove the unnecessary socket:
https://github.com/gber/uwsgi/commit/f78cba0ace5bc8e3471eeb432d50e15748902653

A second issue is that the systemd unit file currently needs a workaround for a
bug in 1.2.6. Though uwsgi is started by systemd, it doesn't correctly report
that back to systemd, so that it remains in activating state until a timeout is
reached after which it is being restarted:

uwsgi.service - uWSGI Emperor Service
          Loaded: loaded (/usr/lib/systemd/system/uwsgi.service; enabled)
          Active: activating (start) since Mo 2013-02-18 12:12:31 CET; 1min 21s ago
         Process: 1609 ExecStartPre=/bin/chown uwsgi:uwsgi /run/uwsgi (code=exited, status=0/SUCCESS)
         Process: 1607 ExecStartPre=/bin/mkdir -p /run/uwsgi (code=exited, status=0/SUCCESS)
        Main PID: 1610 (uwsgi)
          CGroup: name=systemd:/system/uwsgi.service
                  ├─1610 /usr/sbin/uwsgi --ini /etc/uwsgi.ini
                  └─1612 /usr/sbin/uwsgi --ini /etc/uwsgi.ini

So this basically leads to uwsgi being killed and restarted every 90 seconds.
As a workaround for this bug Type=notify needs to be changed to Type=simple.

uwsgi seems to include a fix for this bug in the 1.4 series and I've verified
that Type=notify works correctly again after updating the package to version
1.4.5.

Comment 1 mkotechno 2013-05-12 04:15:20 UTC
I can confirm this bug, being mad because the errors (I just started to use uWSGI) finally after removing the useless socket and modifying the systemd service the stuff is working.

Thanks a lot Guido.

Comment 2 Fedora Update System 2013-10-04 23:54:40 UTC
uwsgi-1.9.17-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/uwsgi-1.9.17-1.fc20

Comment 3 Fedora Update System 2013-10-06 05:31:34 UTC
Package uwsgi-1.9.17-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing uwsgi-1.9.17-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-18427/uwsgi-1.9.17-1.fc20
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-10-09 16:55:39 UTC
uwsgi-1.9.17-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/uwsgi-1.9.17-2.fc20

Comment 5 Fedora Update System 2013-10-15 06:38:16 UTC
uwsgi-1.9.17-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.