httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stupidmail4me <stupidmail...@yahoo.com>
Subject [users@httpd] multiple instances of rotatelogs writing to the same file
Date Tue, 09 Mar 2010 16:03:24 GMT
Hello all,

I have several virtual hosts piping their log files to rotatelogs. For various reasons I have
two virtual hosts piping to the same log file:
<VirtualHost 1.2.3.4>
CustomLog "|/usr/sbin/rotatelogs /logs/site/access_log.%U-%Y 604800" combined
</VirtualHost>
<VirtualHost 1.2.3.5>
CustomLog "|/usr/sbin/rotatelogs /logs/site/access_log.%U-%Y 604800" combined
</VirtualHost>

In this case there are understandably two processes of rotatelogs running:
.../usr/sbin/rotatelogs /logs/access_log.%U-%Y 604800
.../usr/sbin/rotatelogs /logs/access_log.%U-%Y 604800

Is this setup going to cause any unintended consequences? I'm thinking it might run into a
couple of problems but the man page and the web doesn't have a real answer. Does apache and
rotatelogs handle cleanly the rotation because there are two processes trying to do the rotation?
Is there a file locking problem with rotatelogs whereby one process won't be able to write
to the log file?


      

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message