Yes but each apache server is writing to its OWN SEPERATE ACCESS LOG FILE,
its just that they happen to be in the same shared directory. How would
httpd daemon on server A know to LOCK the access log from server B. Get my
point? Unless you are speaking of NFS locking the file for some reason. I
would think this would be fairly simple.
Server A (NFS Server) exports a /logs directory.
Server A's httpd daemon saves access1.log to that /logs directory.
Server B (NFS client) mounts the exported /logs directory.
Server B's httpd daemon saves access2.log to the /logs directory.
Problem is, when Server B serves out web pages, access2.log (Server B's
accesslog file, different from Server A's accesslog file) logs data for a
second then all of a sudden the file size drops to 0 and its empty.
Why?
-----Original Message-----
From: lvs-users-admin@xxxxxxxxxxxxxxxxxxxxxx
[mailto:lvs-users-admin@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Alois
Treindl
Sent: Friday, May 18, 2001 2:48 PM
To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: problem with access_log & nfs on LVS setup
Webstream Technical Support wrote:
>
> Thanks for the reply.
> However, I have a shared directory setup and both Real Servers have their
> own access_log files that are put into that directory (access1.log and
> access2.log...i do it this way so the Stats server can grab both files and
> only use 1 license), so i dont think its a file locking issue at all.
Maybe
> its an issue with NFS. I will upgrade and see what happens.
> Anyone know how to check the version # of NFS on Red Hat? rpm -q nfs does
> not work.
> thanks
Why do you think it is NOT a file locking problem?
On each realserver, you have a lot of httpd daemons running, and to
write
into the same file without interfering, they will have to use file
locking, to
get exclusive access.
If this files sits on a NFS server, and NFS file locking is buggy
(which I only
know as rumor, not as experience), then it might well be the cause of
your problem.
Why don't you keep your access_log local on each server, and rotate
them frequently,
to collect them on one server (merge-sorted by date/time), and then
use your
Stats server on it?
If you use separate log files anyway, I cannot see the need to create
them
on NFS. Nothing prevents you from rotating them every 6 hours, and you
will probably not need more current stats.
_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://www.in-addr.de/mailman/listinfo/lvs-users
|