Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIGTERM to master, gevent http-socket workers will not re-start #180

Closed
edevil opened this issue Mar 11, 2013 · 3 comments
Closed

SIGTERM to master, gevent http-socket workers will not re-start #180

edevil opened this issue Mar 11, 2013 · 3 comments

Comments

@edevil
Copy link
Contributor

edevil commented Mar 11, 2013

Using the latest master branch, if I configure my gevent workers to use http-socket instead of having a fastrouter, they will not restart cleanly after a SIGTERM is sent to the master process:

*** running gevent loop engine [addr:0x46bcb0] ***
Traceback (most recent call last):
  File "core.pyx", line 420, in gevent.core.loop.io (gevent/gevent.core.c:7346)
  File "core.pyx", line 739, in gevent.core.io.__init__ (gevent/gevent.core.c:12782)
ValueError: fd must be non-negative: -1
Traceback (most recent call last):
  File "core.pyx", line 420, in gevent.core.loop.io (gevent/gevent.core.c:7346)
  File "core.pyx", line 739, in gevent.core.io.__init__ (gevent/gevent.core.c:12782)
ValueError: fd must be non-negative: -1
DAMN ! worker 1 (pid: 24079) died :( trying respawn ...
Respawned uWSGI worker 1 (new pid: 24098)
DAMN ! worker 2 (pid: 24080) died :( trying respawn ...
Respawned uWSGI worker 2 (new pid: 24099)
@unbit
Copy link
Owner

unbit commented Mar 12, 2013

can you report the full uWSGI configuration ? thanks

@edevil
Copy link
Contributor Author

edevil commented Mar 12, 2013

uwsgi:
    uid: www-data
    gid: www-data
    module: discoapi.wsgi
    pythonpath: /servers/disco/sites/discoapi
    pythonpath: /servers/disco/discolib
    chdir: /servers/disco/sites/discoapi
    env: DJANGO_SETTINGS_MODULE=discoapi.settings
    processes: 2
    harakiri-verbose: 1
    auto-procname: 1
    no-orphans: 1
    vacuum: 1
    procname-prefix-spaced: discoapi
    master: 1
    listen: 2048
    virtualenv: /servers/python-environments/discosite
    limit-post: 2147483648
    http-timeout: 60
    gevent: 10000
    enable-threads: 1
    shared-socket: 0.0.0.0:80
    http-socket: =0
    buffer-size: 16384
    socket-timeout: 30
    add-header: Connection: close
    http-var: SERVER_PROTOCOL=HTTP/1.0
    cron: 0 -1 -1 -1 -1 /servers/conf/discoapi/clean_unused_blocks.sh
    cron: 30 -1 -1 -1 -1 /servers/conf/discoapi/check_old_revisions.sh
    cron: 15 3 -1 -1 -1 /servers/conf/discoapi/purge_zombies.sh
    threaded-logger: 1
    reload-on-rss: 500
    evil-reload-on-rss: 1000
    touch-chain-reload: /servers/conf/discoapi-chain-reload
    worker-reload-mercy: 120
    lazy-apps: 1
    memory-report: 1
    shared-import: discoapi.uwsgi_init
    ignore-sigpipe: 1
    ignore-write-errors: 1
    logformat: {RSS: %(rssM)MB} [pid: %(pid)|wid: %(wid)] %(addr) [%(ltime)] %(method) %(uri) => generated %(rsize) bytes in %(msecs) msecs (%(proto) %(status)) %(headers) headers in %(hsize) bytes (%(switches) switches on core %(core)) "%(uagent)"

@unbit
Copy link
Owner

unbit commented Mar 12, 2013

ok, i was able to reproduce it, using :80 instead of 0.0.0.0:80 should work (while i fix it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants