Author |
|
sas
Joined: 17 Jul 2006 Posts: 4 Location: Ohio, USA
|
Posted: Mon 17 Jul '06 15:02 Post subject: cronolog issue with httpd 2.2 |
|
|
Does anyone else use cronolog? I can't find a single hit on this forum. I've used it for years on Linux as well as Windows Apache servers without problems, until now. It worked fine on Apache httpd 2.0.47 and 2.0.55 on Windows XP, and on Linux Apache 2.0.52. It also works fine on Apache 2.2 running on Linux. The problem arises with 2.2 on Windows.
When cronolog works correctly, I see 4 cronolog processes, apparantly 2 for each log (error and access). But after firing up 2.2, I see up to 8 processes going. And they are left running when Apache is shutdown.
At least some messages are written to the logs. So this may not seem like that big a problem. But it doesn't look right, and when a few restarts are needed, the cronolog processes really get out of hand.
Any insights are appreciated. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 17 Jul '06 15:59 Post subject: |
|
|
Cronlog under Windows? Do you use cygwin or something like that?
Code: |
To use cronolog with XAMPP, you have to change the ErrorLog and CustomLog entries
in httpd.conf and ssl.conf.
Here are some sample entries I used in my configuration where every day a new log
directory is created.
httpd.conf:
----------
ErrorLog "|bin/cronolog.exe logs/%Y%m%d/error.log"
CustomLog "|bin/cronolog.exe logs/%Y%m%d/access.log" common
ssl.conf:
--------
CustomLog "|bin/cronolog.exe logs/%Y%m%d/ssl_access.log" \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
|
Found from http://addons.xampp.org/cgi-bin/search.pl?pid=19 in the downloadpackage for Apache 2
How did you configured that? |
|
Back to top |
|
sas
Joined: 17 Jul 2006 Posts: 4 Location: Ohio, USA
|
Posted: Mon 17 Jul '06 16:45 Post subject: cronolog on Windows |
|
|
cronolog has been ported to windows. It's not hard to find at www.cronolog.com.
My config is:
Code: | ErrorLog "|D:/httpd/bin/cronolog.exe D:/httpd/logs/error%Y-%m.log"
CustomLog "|D:/httpd/bin/cronolog.exe D:/httpd/logs/access%Y-%m.log" combined |
I suspect that it may need to be recompiled against 2.2 code. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 17 Jul '06 17:00 Post subject: Re: cronolog on Windows |
|
|
sas wrote: | cronolog has been ported to windows. It's not hard to find at www.cronolog.com. |
The page is not found.
the org site run.
After some recherche, I found out that also rotatelogs.exe create 44 instances.
You may use mod_rotate_log www.apachelounge.com/download/ |
|
Back to top |
|
sas
Joined: 17 Jul 2006 Posts: 4 Location: Ohio, USA
|
Posted: Mon 17 Jul '06 20:38 Post subject: reply |
|
|
Oops, sorry about that. It is http://cronolog.org/ as I suppose you found. There's not been anything new on it for some years now, although I don't suppose much needs to be done.
If rortatelogs has the same problem, I guess Apache 2.2 for win32 has a bug in log piping. I will see if there's a place to report it.
mod_rotate_log sounds pretty good, but it doesn't have the functionality I want. |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3092 Location: Hilversum, NL, EU
|
Posted: Mon 17 Jul '06 20:45 Post subject: |
|
|
I think Apache 2.2 has no bug regarding this. For 2.2.2 you have to build cronolog against Apache 2.2.2, not sure it is 2.2 compatible.
From the Apache site:
Modules written for Apache 2.0 will need to be recompiled in order to run with Apache 2.2
On *.nix you build "auto" against the apache you have installed.
Steffen |
|
Back to top |
|
archivero
Joined: 30 Aug 2006 Posts: 1
|
Posted: Wed 30 Aug '06 14:12 Post subject: |
|
|
I managed to compile cronolog natively on win32 without cygwin. It worked as expected on apache 2.0.55. I've updated my istallation to 2.2 using the binary on this site and it works again as expected with two minor problems:
- a cmd.exe window is opened for every 2 cronolog processes
- when I stop the httpd.exe cronolog's are still executing...
Has anyone had similar problems? |
|
Back to top |
|
cyclone
Joined: 12 Sep 2006 Posts: 16 Location: St Louis
|
Posted: Tue 12 Sep '06 14:10 Post subject: |
|
|
archivero wrote: | I managed to compile cronolog natively on win32 without cygwin. It worked as expected on apache 2.0.55. I've updated my istallation to 2.2 using the binary on this site and it works again as expected with two minor problems:
- a cmd.exe window is opened for every 2 cronolog processes
- when I stop the httpd.exe cronolog's are still executing...
Has anyone had similar problems? |
Exactly the same problem. I have no solution yet. I am using cronolog 1.6.1 and Apache 2.2.3
You can exacerbate the problem if you want to study it by setting MaxRequestsPerChild to some low number. Apache will then hang a couple cronolog's each time it restarts. |
|
Back to top |
|
toadie
Joined: 28 Oct 2006 Posts: 8
|
Posted: Mon 30 Oct '06 4:02 Post subject: Re: cronolog on Windows |
|
|
Do you know if mod_rotate_log work with RewriteLog? It looks like RewriteLog no longer works in PIPE Mode in 2.2.3 (even with the standard rotatelogs.exe)? |
|
Back to top |
|
toadie
Joined: 28 Oct 2006 Posts: 8
|
Posted: Mon 30 Oct '06 7:11 Post subject: |
|
|
Looks like there's a bug in server/log.c in function piped_log_spawn
((status = apr_procattr_cmdtype_set(procattr,
APR_SHELLCMD_ENV)) != APR_SUCCESS) ||
should read
((status = apr_procattr_cmdtype_set(procattr,
APR_PROGRAM_ENV)) != APR_SUCCESS)
After this patch, when you close the main program, the piped processes are also killed off. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
|
Back to top |
|
toadie
Joined: 28 Oct 2006 Posts: 8
|
Posted: Tue 31 Oct '06 1:59 Post subject: |
|
|
Hello James,
It's not really a bug with cronolog (although the mailing list for cronolog has been dead for a long time but that's another issue altogether) because it also affects rotatelogs.
Apache's been bugged. The info posted here is just an FYI for people who needs the fix now (and are willing to patch & re-compile ) instead of waiting for the next release.
Toadie. |
|
Back to top |
|
chk
Joined: 18 Nov 2006 Posts: 1
|
Posted: Sat 18 Nov '06 17:32 Post subject: |
|
|
toadie wrote: | Apache's been bugged. The info posted here is just an FYI for people who needs the fix now (and are willing to patch & re-compile ) instead of waiting for the next release.
Toadie. |
I think in Apache 2.2.3 the error is still there. Where can I find the info, when a corrected Apache version will be available?
cu Christian |
|
Back to top |
|
Jorge
Joined: 12 Mar 2006 Posts: 376 Location: Belgium
|
Posted: Sun 19 Nov '06 0:51 Post subject: |
|
|
chk wrote: | toadie wrote: | Apache's been bugged. The info posted here is just an FYI for people who needs the fix now (and are willing to patch & re-compile ) instead of waiting for the next release.
Toadie. |
I think in Apache 2.2.3 the error is still there. Where can I find the info, when a corrected Apache version will be available?
cu Christian |
It depends, If you have submitted a bug report... check its status. if it sais Closed...
You can get a fixed build by downloading the source. Or wait for the next release. I have a feeling we might see 2.2.4 early december, don't take my word for it though. |
|
Back to top |
|
tdonovan Moderator
Joined: 17 Dec 2005 Posts: 611 Location: Milford, MA, USA
|
Posted: Sun 19 Nov '06 17:35 Post subject: |
|
|
Be careful if you apply the source code change to server/log.c per toadie above!
The change is: Quote: | ((status = apr_procattr_cmdtype_set(procattr,
APR_SHELLCMD_ENV)) != APR_SUCCESS) || | to: Quote: | ((status = apr_procattr_cmdtype_set(procattr,
APR_PROGRAM_ENV)) != APR_SUCCESS) || |
You do not want to remove the boolean operator || at the end of the second line.
This is Apache bug 16761
-tom- |
|
Back to top |
|