httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Milind Vaidya <kava...@gmail.com>
Subject [users@httpd] Piping logs to a java process : creates multiple processes
Date Tue, 24 Jan 2017 00:36:55 GMT
>
> I am writing messages to error_log file as well as sending to std out.
>
> The setting looks like
>
>
> ErrorLog  "| /usr/bin/tee -a /var/log/httpd/error_log |  java -cp producer.jar stdin.producer.StdInProducer
/CustomProducer/config.json >> /producer_init.log 2>&1"`
>
>
When httpd is started it spawns 2 processes and adds one every one hour,
keeping all alive

Only other thing happening per hour is rotation of error_log file by
logrotate with copytruncate option (which copies the file data and
truncates original file keeping the file descriptor unchanged )

I also tested it with another program with setting as follows which runs
fine, so what am I doing wrong here ?

ErrorLog  "| /usr/bin/tee -a /var/log/httpd/error_log |
/usr/bin/logger -u /tmp/apache_log.socket"

Mime
View raw message