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

Logging continues to old file after kill -USR1 #1317

Closed
shturman opened this issue Aug 1, 2016 · 4 comments
Closed

Logging continues to old file after kill -USR1 #1317

shturman opened this issue Aug 1, 2016 · 4 comments

Comments

@shturman
Copy link

shturman commented Aug 1, 2016

Steps to reproduce with gunicorn 19.6.0:

  1. set accesslog = "path/to/access/log"
  2. move file "mv path/to/access/log path/to/access/log2"
  3. kill -USR1 pid
  4. empty file path/to/access/log created but access log stream goes to path/to/access/log2

I'm using Python 3.5.2
Ubuntu xenial 16.04
Worker: GunicornUVLoopWebWorker from aiohttp.

@tilgovi
Copy link
Collaborator

tilgovi commented Oct 1, 2016

Does this happen with other worker types?

@andrew-grasso
Copy link

I'm seeing the same thing with the default (sync?) worker type.
gunicorn 19.6.0
Python 2.7.6
Ubuntu Trusty 14.04

I'm using 4 workers, and using the same process as @shturman I see that some of the workers continue to use the old log file, while others move on to using the new one. I'm able to get them to load the new file by issuing a HUP instead of USR1 which closes all workers and re spawns them.

@jorgehatccrma
Copy link

We also see the same behavior using logging.handlers.RotatingFileHandler with default workers.

@benoitc
Copy link
Owner

benoitc commented Oct 14, 2022

not reproduced.

@benoitc benoitc closed this as completed Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants