Re: apache delayed log write ?



damcey@xxxxxxxxx wrote:
I'm wondering if it's possible to delay write of CustomLog directive
instead of writting to file as soon as request is made ? I believe it
should be possible to pipe data to external program that will store
log in buffer and then write it after a delay, say every 10 seconds
but I'm not aware of program that is able to do this. Any help is

buffered logging is already available in apache.

for apache 2.0.41+ and newer, buffered logging is a mod_log_config configuration option that you can enable via httpd.conf:

http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#bufferedlogs

The BufferedLogs directive causes mod_log_config to store several log
entries in memory and write them together to disk, rather than writing
them after each request. On some systems, this may result in more
efficient disk access and hence higher performance. It may be set only
once for the entire server; it cannot be configured per virtual-host.

for apache 1.3b2 -> 2.0.40, you can probably enable log buffering in httpd.h by setting:
#define BUFFERED_LOGS
or by adding -DBUFFERED_LOGS as a flag to your c compiler.

hth
--sean

--
sean dreilinger - http://durak.org/sean/
.



Relevant Pages

  • [NT] Vulnerability Report for Windows SMB DoS
    ... cross-platform mechanism for client systems to request file services from ... In order to exploit the vulnerability a user account is needed for the ... is therefore vulnerable to a denial of service attack. ... Later in the processing of the request, at SRV.SYS+33209h another buffer ...
    (Securiteam)
  • Re: [PATCH] block: fix residual byte count handling
    ... buffer stuff affected only libata but seems it doesn't ...). ... is because before moving alignment and padding to block layer, ... For drivers which don't require data size adjustment from block layer, ... For drivers which do require request size adjustments, ...
    (Linux-Kernel)
  • Re: [RFC] Netlink and user-space buffer pointers
    ... iscsi pdu and iscsi pdu data ... struct can be the iscsi request that is to be transmitted. ... the offload needs the full buffer sitting and ready. ... well into replacing things like our sg_io ioctls. ...
    (Linux-Kernel)
  • Re: Problem with WdfRequestRetrieveOutputMemory
    ... refer to the action that you are going to perform on the buffer. ... retrieve an ouput buffer when you will write to it and you retrieve an input ... > when a new request arrives, I create a new WDFREQUEST using this code: ... When I use WdfRequestRetrieveOutputMemory on 'Request' ...
    (microsoft.public.development.device.drivers)
  • Re: Would like some clarification on DATA_OVERRUN and QUEUE_FROZEN conditions
    ... you could set NO_QUEUE_FREEZE on every request you send to the device if you ... I could use the NO_QUEUE_FREEZE option and avoid the ... >> this so the class driver has an option to react to the error (retrieve ... >> if you think there may be more data than you have supplied buffer space ...
    (microsoft.public.development.device.drivers)