Discussion:
CustomLog to a pipe question
Leonardo Herrera
2003-11-05 17:39:44 UTC
Permalink
Hi, I have a question. Does mod_log_spread support logging to a pipe
instead of file in the CustomLog directive? I tried to do this without
result, for example

SpreadDaemon 4803
CustomLog "|/bin/rotatelogs /logs/access_log 300" common
CustomLog $hits common

Regards,
--
Leonardo Herrera L.
mailto:***@epublish.cl
Leonardo Herrera
2003-11-06 15:12:43 UTC
Permalink
Post by Leonardo Herrera
Hi, I have a question. Does mod_log_spread support logging to a pipe
instead of file in the CustomLog directive? I tried to do this without
result, for example
SpreadDaemon 4803
CustomLog "|/bin/rotatelogs /logs/access_log 300" common
CustomLog $hits common
I hate to reply to myself, but I found the problem. There is a small bug
in mod_log_spread.c that disallowed to use piped log files. I've
attached a diff file (actually, the fix is to add a missing "else" in
open_config_log(), the rest is purely cosmetic)

Regards,
--
Leonardo Herrera L.
mailto:***@epublish.cl
Janis Putrams
2003-11-06 15:41:40 UTC
Permalink
Hi!
Is mod_log_spread working fine for y? Because I installed it recently and
got connection failures on heigh load. Posted to mailing list but had no
answer so far. Sad but true .. Got to look for another solution.
Janis Putrams

-----Original Message-----
From: mls-users-***@lists.backhand.org
[mailto:mls-users-***@lists.backhand.org]On Behalf Of Leonardo Herrera
Sent: Thursday, November 06, 2003 5:13 PM
To: mls-***@lists.backhand.org
Subject: Re: [mls-users] CustomLog to a pipe question
Post by Leonardo Herrera
Hi, I have a question. Does mod_log_spread support logging to a pipe
instead of file in the CustomLog directive? I tried to do this without
result, for example
SpreadDaemon 4803
CustomLog "|/bin/rotatelogs /logs/access_log 300" common
CustomLog $hits common
I hate to reply to myself, but I found the problem. There is a small bug
in mod_log_spread.c that disallowed to use piped log files. I've
attached a diff file (actually, the fix is to add a missing "else" in
open_config_log(), the rest is purely cosmetic)

Regards,
--
Leonardo Herrera L.
mailto:***@epublish.cl
George Schlossnagle
2003-11-06 15:49:47 UTC
Permalink
Post by Janis Putrams
Hi!
Is mod_log_spread working fine for y? Because I installed it recently and
got connection failures on heigh load. Posted to mailing list but had no
answer so far. Sad but true
Didn't see your mail. Can you define 'high load'? Specifically, how
many children do you have trying to send messages at peak?


George
Leonardo Herrera
2003-11-06 16:12:14 UTC
Permalink
Post by George Schlossnagle
Post by Janis Putrams
Hi!
Is mod_log_spread working fine for y? Because I installed it recently and
got connection failures on heigh load. Posted to mailing list but had no
answer so far. Sad but true
Didn't see your mail. Can you define 'high load'? Specifically, how
many children do you have trying to send messages at peak?
George
I think he meant this:
http://lists.backhand.org/pipermail/mls-users/2003-October/000210.html
--
Leonardo Herrera L.
mailto:***@epublish.cl
George Schlossnagle
2003-11-06 16:18:17 UTC
Permalink
Post by Leonardo Herrera
Post by George Schlossnagle
Post by Janis Putrams
Hi!
Is mod_log_spread working fine for y? Because I installed it
recently and
got connection failures on heigh load. Posted to mailing list but had no
answer so far. Sad but true
Didn't see your mail. Can you define 'high load'? Specifically, how
many children do you have trying to send messages at peak?
George
http://lists.backhand.org/pipermail/mls-users/2003-October/000210.html
Sounds like he is overconnecting to a single daemon (as is described in
README.spread in m_l_s sources). It's not advisable to run a single
daemon and have everyone connect to it. Much better to have every host
run their own daemon, all belonging to the same spread ring.

George
Janis Putrams
2003-11-21 20:29:31 UTC
Permalink
Thank you very much for advice. I did as y suggested but still have some
problems.
I have three web servers and one of them is writing log.
On each server I have /etc/spread.conf
Spread_Segment 192.168.123.95:4803 {
srva 192.168.123.69
srvb 192.168.123.71
srvc 192.168.123.70
}
EventLogFile = testlog.out
DaemonUser = spread
DaemonGroup = spread
on each server I run: spread &
and on each server I have in httpd.conf
<IfModule mod_log_spread.c>
SpreadDaemon 4803
CustomLog $www virtualhosts
</IfModule>
But still on the weakest server from time to time I get
[Fri Nov 21 21:58:54 2003] [error] (2)No such file or directory: Could not
connect to spread with private_name ap27959. Error -6
[Fri Nov 21 21:58:54 2003] [error] (2)No such file or directory: Could not
connect to spread with private_name ap27958. Error -6
When I run spuser and join www I see some logs coming in.
When doing netstat -a I see that it's using unix socket to connect to
spread:
unix 3 [ ] STREAM CONNECTED 143538335 /tmp/4803
and I have average 35 httpd processes running now and I have same count of
those:

# ps aux|grep "/usr/sbin/httpd"|wc -l
35
# netstat -a|grep "/tmp/4803"|wc -l
33
# uptime
10:05pm up 139 days, 5:34, 4 users, load average: 0.27, 0.21, 0.34
# cat /proc/cpuinfo |grep MHz
cpu MHz : 549.849
# ss|grep requests/sec
1.3 requests/sec - 29.6 kB/second - 22.7 kB/request

Sometimes httpd process count jumps to 100 and I would like it to handle
that as well.
I would really appreciate if somebody could help me.

janis


-----Original Message-----
From: mls-users-***@lists.backhand.org
[mailto:mls-users-***@lists.backhand.org]On Behalf Of George
Schlossnagle
Sent: Thursday, November 06, 2003 6:18 PM
To: Leonardo Herrera
Cc: mls-***@lists.backhand.org
Subject: Re: [mls-users] CustomLog to a pipe question
Post by George Schlossnagle
Post by Janis Putrams
Hi!
Is mod_log_spread working fine for y? Because I installed it
recently and
got connection failures on heigh load. Posted to mailing list but had no
answer so far. Sad but true
Didn't see your mail. Can you define 'high load'? Specifically, how
many children do you have trying to send messages at peak?
George
http://lists.backhand.org/pipermail/mls-users/2003-October/000210.html
Sounds like he is overconnecting to a single daemon (as is described in
README.spread in m_l_s sources). It's not advisable to run a single
daemon and have everyone connect to it. Much better to have every host
run their own daemon, all belonging to the same spread ring.

George
Jose R. Ilabaca
2003-11-21 22:07:26 UTC
Permalink
Every a new httpd process is started the error log receives that error,
but this is not a problem.


-----Mensaje original-----
De: mls-users-***@lists.backhand.org
[mailto:mls-users-***@lists.backhand.org] En nombre de Janis Putrams
Enviado el: Viernes, 21 de Noviembre de 2003 17:30
Para: George Schlossnagle; Leonardo Herrera
CC: mls-***@lists.backhand.org
Asunto: RE: [mls-users] CustomLog to a pipe question


Thank you very much for advice. I did as y suggested but still have some
problems. I have three web servers and one of them is writing log. On
each server I have /etc/spread.conf
Spread_Segment 192.168.123.95:4803 {
srva 192.168.123.69
srvb 192.168.123.71
srvc 192.168.123.70
}
EventLogFile = testlog.out
DaemonUser = spread
DaemonGroup = spread
on each server I run: spread &
and on each server I have in httpd.conf
<IfModule mod_log_spread.c>
SpreadDaemon 4803
CustomLog $www virtualhosts
</IfModule>
But still on the weakest server from time to time I get
[Fri Nov 21 21:58:54 2003] [error] (2)No such file or directory: Could
not connect to spread with private_name ap27959. Error -6 [Fri Nov 21
21:58:54 2003] [error] (2)No such file or directory: Could not connect
to spread with private_name ap27958. Error -6 When I run spuser and
join www I see some logs coming in. When doing netstat -a I see that
it's using unix socket to connect to
spread:
unix 3 [ ] STREAM CONNECTED 143538335 /tmp/4803
and I have average 35 httpd processes running now and I have same count
of
those:

# ps aux|grep "/usr/sbin/httpd"|wc -l
35
# netstat -a|grep "/tmp/4803"|wc -l
33
# uptime
10:05pm up 139 days, 5:34, 4 users, load average: 0.27, 0.21, 0.34
# cat /proc/cpuinfo |grep MHz
cpu MHz : 549.849
# ss|grep requests/sec
1.3 requests/sec - 29.6 kB/second - 22.7 kB/request

Sometimes httpd process count jumps to 100 and I would like it to handle
that as well. I would really appreciate if somebody could help me.

janis


-----Original Message-----
From: mls-users-***@lists.backhand.org
[mailto:mls-users-***@lists.backhand.org]On Behalf Of George
Schlossnagle
Sent: Thursday, November 06, 2003 6:18 PM
To: Leonardo Herrera
Cc: mls-***@lists.backhand.org
Subject: Re: [mls-users] CustomLog to a pipe question
Post by George Schlossnagle
Post by Janis Putrams
Hi!
Is mod_log_spread working fine for y? Because I installed it
recently and got connection failures on heigh load. Posted to
mailing list but had no
answer so far. Sad but true
Didn't see your mail. Can you define 'high load'? Specifically, how
many children do you have trying to send messages at peak? George
http://lists.backhand.org/pipermail/mls-users/2003-October/000210.html
Sounds like he is overconnecting to a single daemon (as is described in
README.spread in m_l_s sources). It's not advisable to run a single
daemon and have everyone connect to it. Much better to have every host
run their own daemon, all belonging to the same spread ring.

George
Janis Putrams
2003-11-24 10:12:29 UTC
Permalink
tnx, but isn't there a way to overcome this? I have more of these error
messages than I have logs :). Doesn't it loose that log when it fails
connecting the first time. It's kind of strange to ignore such serious error
messages. How will I know if it really fails?
Janis Putrams

-----Original Message-----
From: Jose R. Ilabaca [mailto:***@certifica.com]
Sent: Saturday, November 22, 2003 12:07 AM
To: mls-***@lists.backhand.org
Cc: 'Janis Putrams'
Subject: RE: [mls-users] CustomLog to a pipe question


Every a new httpd process is started the error log receives that error,
but this is not a problem.


-----Mensaje original-----
De: mls-users-***@lists.backhand.org
[mailto:mls-users-***@lists.backhand.org] En nombre de Janis Putrams
Enviado el: Viernes, 21 de Noviembre de 2003 17:30
Para: George Schlossnagle; Leonardo Herrera
CC: mls-***@lists.backhand.org
Asunto: RE: [mls-users] CustomLog to a pipe question


Thank you very much for advice. I did as y suggested but still have some
problems. I have three web servers and one of them is writing log. On
each server I have /etc/spread.conf
Spread_Segment 192.168.123.95:4803 {
srva 192.168.123.69
srvb 192.168.123.71
srvc 192.168.123.70
}
EventLogFile = testlog.out
DaemonUser = spread
DaemonGroup = spread
on each server I run: spread &
and on each server I have in httpd.conf
<IfModule mod_log_spread.c>
SpreadDaemon 4803
CustomLog $www virtualhosts
</IfModule>
But still on the weakest server from time to time I get
[Fri Nov 21 21:58:54 2003] [error] (2)No such file or directory: Could
not connect to spread with private_name ap27959. Error -6 [Fri Nov 21
21:58:54 2003] [error] (2)No such file or directory: Could not connect
to spread with private_name ap27958. Error -6 When I run spuser and
join www I see some logs coming in. When doing netstat -a I see that
it's using unix socket to connect to
spread:
unix 3 [ ] STREAM CONNECTED 143538335 /tmp/4803
and I have average 35 httpd processes running now and I have same count
of
those:

# ps aux|grep "/usr/sbin/httpd"|wc -l
35
# netstat -a|grep "/tmp/4803"|wc -l
33
# uptime
10:05pm up 139 days, 5:34, 4 users, load average: 0.27, 0.21, 0.34
# cat /proc/cpuinfo |grep MHz
cpu MHz : 549.849
# ss|grep requests/sec
1.3 requests/sec - 29.6 kB/second - 22.7 kB/request

Sometimes httpd process count jumps to 100 and I would like it to handle
that as well. I would really appreciate if somebody could help me.

janis


-----Original Message-----
From: mls-users-***@lists.backhand.org
[mailto:mls-users-***@lists.backhand.org]On Behalf Of George
Schlossnagle
Sent: Thursday, November 06, 2003 6:18 PM
To: Leonardo Herrera
Cc: mls-***@lists.backhand.org
Subject: Re: [mls-users] CustomLog to a pipe question
Post by George Schlossnagle
Post by Janis Putrams
Hi!
Is mod_log_spread working fine for y? Because I installed it
recently and got connection failures on heigh load. Posted to
mailing list but had no
answer so far. Sad but true
Didn't see your mail. Can you define 'high load'? Specifically, how
many children do you have trying to send messages at peak? George
http://lists.backhand.org/pipermail/mls-users/2003-October/000210.html
Sounds like he is overconnecting to a single daemon (as is described in
README.spread in m_l_s sources). It's not advisable to run a single
daemon and have everyone connect to it. Much better to have every host
run their own daemon, all belonging to the same spread ring.

George

Loading...