nginx_tcp_proxy_module
nginx_tcp_proxy_module copied to clipboard
reload log file (logrotate)
When the nginx daemon is reloaded, the logfile handle isnt updated.
It is common for logrotate to change move the file and then reload nginx to reload the handle to log to a new file.
You means the tcp_access.log will not update after reload? Can you show me your nginx.conf?
Thanks.
Yes. the TCP log file. My config file is rather large and contains some semi-sensitive IP addresses Ill email it to you?
Its key features:
- Lots of TCP server entries
- Each follows a specific template
"server { listen [HostIP]:[HostPort];
access_log /var/log/proxy/tcp.log buffer=2K; proxy_pass [UpstreamName]; }"
In my server, it worked for me. Maybe the log is buffered? Try more test request.
If it still not work, You can email me your full configure file.
Thanks.
On 2012-7-27 23:01, splitice wrote:
Yes. the TCP log file. My config file is rather large and contains some semi-sensitive IP addresses Ill email it to you?
Its key features:
- Lots of TCP server entries
- Each follows a specific template
"server { listen [HostIP]:[HostPort];
access_log /var/log/proxy/tcp.log buffer=2K; proxy_pass [UpstreamName]; }"
Reply to this email directly or view it on GitHub: https://github.com/yaoweibin/nginx_tcp_proxy_module/issues/50#issuecomment-7307557
Thanks, -Weibin Yao
Hmm for me its working on one server but not on the other, perhaps it has something to do with the sheer quantity of reloads?
This servers config is updated atleast once every 5 minutes on average. Each time getting reloaded. Additionally logrotate runs hourly.
I just moved the config file, reloaded the server and will come back in the morning after many GBs of traffic and take a look.
Hmm strange, I came back and one server had an empty log file that wasnt updating. Seems to have something to do with the number of reloads. I will do some more testing and get back to you.
Thanks. I'll also do more tests in my end.