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 USR1 #345

Closed
gggritso opened this issue May 15, 2012 · 5 comments
Closed

Logging continues to old file after USR1 #345

gggritso opened this issue May 15, 2012 · 5 comments

Comments

@gggritso
Copy link

I'm using gUnicorn 0.14.2 with the following config (truncated):

pidfile = '/some_loc/myapp.pid'

user = 'user'
group = 'group'

daemon = True

proc_name = 'myapp'
errorlog = '/var/log/gunicorn/myapp.log'

and the following logrotate conf for the app:

/var/log/gunicorn/myapp.log {
    daily
    missingok
    rotate 14
    compress
    notifempty
    create 640 user group
    postrotate
        kill -USR1 `cat /someloc/myapp.pid`
    endscript
}

When the logrotate script runs, 2012-05-15 06:53:52 [16634] [INFO] Handling signal: usr1 shows up in the myapp.1 file, however, all further logging continues to go to themyapp.1 file instead of the myapp file.

@benoitc
Copy link
Owner

benoitc commented Jun 4, 2012

I just tried logrotate on a new machine with latest head and couldn't reproduce. Can you confirm it is still happening with latest head ?

@gggritso
Copy link
Author

gggritso commented Jun 7, 2012

Tried again, could not reproduce it. Closing. Thanks!

@gggritso gggritso closed this as completed Jun 7, 2012
@shturman
Copy link

shturman commented Jul 26, 2016

Can reproduce with gunicorn 19.6.0.
Steps:

  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

@tilgovi
Copy link
Collaborator

tilgovi commented Jul 28, 2016

@shturman since this issue is four years old, would you mind simply filing a new one so we can track it without pinging the original poster who marked it resolved?

@shturman
Copy link

shturman commented Aug 1, 2016

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

4 participants