httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <>
Subject pconf, plog and module logging
Date Thu, 15 Mar 2007 12:19:07 GMT
Sorry second post, I think I used the wrong sender address the first time.

Hello httpd developers,

we ran into a crash on the iSeries platform with mod_jk. It turned out,
that the crash was fixed by using the pool plog instead of pconf when
allocating logging objects in the post-config hook.

Now I want to make sure, that I don't get any negative side effects from
switching to plog.

Originally I read mod_rewrite.c, because the explanation of plog and
pconf didn't give me a rich picture about the life cycle of those pools.
mod_rewrite uses pconf when calling

- ap_server_root_relative()
- ap_open_piped_log()
- apr_file_open()

inside open_rewritelog().

Other modules like mod_log_config or mod_log_forensic use plog.

So what's the general recommendation, which pool to use for the calls
above related to log files?

Apart from the calls

- ap_server_root_relative()
- ap_open_piped_log()
- apr_file_open()

we also allocate two memory structures from the pool (using
apr_palloc()), where we keep additional info concerning the loggers.

Furthermore: until now we call apr_file_inherit_set(). None of the
modules seems to do that. It's implementation in apr is a little tricky,
but it seems to register a cleanup handler, that closes the file.

Are there general recommendations, if one should call
apr_file_inherit_set() for opened log files (or log pipes), and
depending on the type of pool used (plog, pconf), which kind of cleanup
handler we should register. I ask, because most of the modules seem not
to include cleanup handlers for the logging.

Any hints are highly welcome!

Thanks a lot,


View raw message