On 11/05/2012 12:35 PM, Cosmin Luță wrote:
> Hi,
>
> I'm using uwsgi 1.2.5 with an application configured like this:
>
> <uwsgi>
> <socket>/var/run/uwsgi_app.sock</socket>
> <chmod-socket>660</chmod-socket>
> <touch-reload>/var/run/reload_app</touch-reload>
> <cpu-affinity>1</cpu-affinity>
> <stats>:65530</stats>
> <disable-logging />
> <daemonize>/var/log/app.log</daemonize>
> <logto>/var/log/app.log</logto>
> <log-master />
> <log-reopen />
> <log-4xx />
> <log-5xx />
> <log-date />
> <log-zero />
> <master />
> <lazy />
> <no-orphans />
> <processes>20</processes>
> <reload-mercy>30</reload-mercy>
> <single-interpreter />
> <procname-prefix-spaced>myapp</procname-prefix-spaced>
> <gid>www-data</gid>
> <uid>www-data</uid>
> <listen>65535</listen>
> <module>myapp.app.wsgi</module>
> <callable>app</callable>
> </uwsgi>
>
>
> I'm also trying to do log rotation using the standard logrotate tool,
> configured like:
>
> /var/log/app.log {
> rotate 4
> missingok
> notifempty
> size 800M
> maxage 5
> nomail
> noshred
> postrotate
> reload myapp || true
> endscript
> }
>
>
> This is supposed to send a SIGHUP to uwsgi (which is managed by
> Upstart), causing it to do a graceful reload after a log rotation was done.
>
> I'm a bit puzzled about the log-reopen option, I was expecting it to
> cause uwsgi to create a new /var/log/app.log after the old one has been
> rotated to /var/log/app.log.1, but for some reason it keeps logging to
> the rotated file.
>
> Any idea what am I doing wrong here?
>
Seems that using <touch-logreopen> forces uwsgi to create the new log
file. I'll add that to my logrotate script.
>
> Best regards,
> Cosmin
>
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi