0

I have this in each virtual hosts in my Apache HTTPD confs:

CustomLog "|$tee -a /www/domainX/logs/apache/acces_log" combined

On servers with more than 100 domains, there is an issue with slow restarts or graceful restarts because restarting all processes takes about 10-30 seconds (depending on the number of domains). When I remove all custom logs from the configurations, the restart takes 1 second.

There is one option — using rotatelogs — but I need the newest log file to be named "access_log". Is there any easy way to do this without tee and faster?

1 Answer 1

0

I don't understand what the point of using tee -a here is. That may have some bearing on what you consider an appropriate solution.

there is an issue with slow restarts or graceful restarts

There should be no loss of service with a graceful restart. Stop/start should be infrequent. If you want good availability for your services then this is not the place to start - you need more than one node and some way to distribute the traffic across available nodes.

Is tee really the source of slowness here? Are you aware that a graceful restart needs to wait until the existing http requests have completed before terminating the old http process?

using rotatelogs — but I need the newest log file to be named "access_log"

Did you read the manual?

-L linkname Causes a hard link to be made from the current logfile to the specified link name. This can be used to watch the log continuously across rotations using a command like tail -F linkname.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .