[Spread-users] send text to spread group from command line?

Monte Ohrt monte at ispi.net
Tue Aug 21 15:04:46 EDT 2001


Ok, that changed fixed the startup error, but still a couple of
problems:

1) All of the logs are being sent to the first group assigned in the
httpd.conf file. So in this example:

<VirtualHost foo>
        CustomLog "|/usr/local/bin/sp_client -g foo_access_log -s 4803"
combined
        ErrorLog "|/usr/local/bin/sp_client -g foo_error_log -s 4803"
</VirtualHost>

<VirtualHost bar>
        CustomLog "|/usr/local/bin/sp_client -g bar_access_log -s 4803"
combined
        ErrorLog "|/usr/local/bin/sp_client -g bar_error_log -s 4803"
</VirtualHost>

all four logs (custom and error) are being sent to the "foo_access_log"
group. (?)


2) When I start apache, each sp_client setting starts its own process:

    root  7944  7943  0 13:38:05 ?        0:00
/usr/local/etc/apache/bin/sp_client -g default_access_log -s 4803
    root  7940  7939  0 13:38:04 ?        0:00
/usr/local/etc/apache/bin/sp_client -g default_access_log -s 4803
    root  7942  7941  0 13:38:04 ?        0:00
/usr/local/etc/apache/bin/sp_client -g getz-web_error_log -s 4803
    root  7945  7759  0 13:38:05 ?        0:00 /bin/sh -c
/usr/local/etc/apache/bin/sp_client -g getz-web_access_log -s 4803
    root  7946  7945  0 13:38:05 ?        0:00
/usr/local/etc/apache/bin/sp_client -g getz-web_access_log -s 4803
    root  7939  7759  0 13:38:04 ?        0:00 /bin/sh -c
/usr/local/etc/apache/bin/sp_client -g default_access_log -s 4803
    root  7658     1  0 13:38:00 pts/3    0:00
/usr/local/etc/apache/bin/sp_client -g default_access_log -s 4803
    root  7943  7759  0 13:38:05 ?        0:00 /bin/sh -c
/usr/local/etc/apache/bin/sp_client -g default_access_log -s 4803
    root  7941  7759  0 13:38:04 ?        0:00 /bin/sh -c
/usr/local/etc/apache/bin/sp_client -g getz-web_error_log -s 4803

This doesn't look too scalable. We'd like to see one process for
CustomLog and one for ErrorLog, no matter how many virtual hosts. Now
the CustomLog we have two options: use mod_log_spread to handle the log
spreading (which we'll probably do), or put %V in the log file format
and setup sp_client to spread to different groups depending on the
virtual host name imbedded in the log message. ErrorLog is different
though, we cannot just put %V into the error log without hacking apache.
What is the best thing to do? If we let there be separate processes for
each error log, will this eat up file descriptors, defeating one
important reason for using spread?

Monte

Theo Schlossnagle wrote:
> 
> On Tuesday, August 21, 2001, at 12:19  PM, Monte Ohrt wrote:
> > SP_error: (N) Connection rejected, name not unique
> >
> >>>     snprintf(privatename, MAX_GROUP_NAME, "sp_client_%d", getpid());
> 
> Change the above line to:
>   snprintf(privatename, MAX_PRIVATE_NAME, "spc_%d", getpid());
> 
> and you should be fine.
> MAX_PRIVATE_NAME is the limitation here and is set by default to 10.  So
> the prefix "sp_client_" is 10 letters and the process ID is never
> incorporated into the name.
> 
> --
> Theo Schlossnagle
> 1024D/82844984/95FD 30F1 489E 4613 F22E  491A 7E88 364C 8284 4984
> 2047R/33131B65/71 F7 95 64 49 76 5D BA  3D 90 B9 9F BE 27 24 E7
> 
> _______________________________________________
> spread-users mailing list
> spread-users at lists.spread.org
> http://lists.spread.org/mailman/listinfo/spread-users

--
Monte Ohrt <monte at ispi.net>
http://www.ispi.net/





More information about the Spread-users mailing list