1828584 Members
2388 Online
109982 Solutions
New Discussion

CSWS 2.1 log rotation

 
SOLVED
Go to solution
WWarren
Advisor

CSWS 2.1 log rotation

Environment:

OpenVMS V8.2 (cluster)
CSWS V2.1 (brand new installation; no content other than installation splash screen)

Problem:

When I $ RENAME access_log and error_log, and then
$ @sys$startup:apache$startup graceful
the new log files are created, but a
$ show device/files apache$root
shows that process APACHE$SWS has both the old and new log files open -- indefinitely (as far as I can tell). If I repeat the procedure, then I show APACHE$SWS with 3 sets of open log files.

As there is no Web activity, the switch should take place immediately (at least as I read the documentation).

Of course, if I shut down and start up CSWS the old log files are closed, but this isn't an acceptable work-around.

Can anyone reproduce the experience or have any suggestions?
5 REPLIES 5
Kris Clippeleyr
Honored Contributor

Re: CSWS 2.1 log rotation

Good morning,
I recall having the same issue with older versions of SWS. We solved it by nightly stopping the webserver, renaming the logfiles, and starting the webserver again.
Not that elegant but it works for us.
Regards,
Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Steven Schweda
Honored Contributor

Re: CSWS 2.1 log rotation

Similar here, I'm still at CSWS V1.2 +
CSWS12_UPDATE V7.0, and at (after) year end,
I stop the server, then manually edit the
access log to save the previous year's data
somewhere else, then leave only the current
(new) year's data in the file, and finally
restart the server.

Not classy, but simple and semi-reliable (if
I can trust me).

Considering that in this version, even FLUSH
didn't work right, I wouldn't trust anything
fancier than a complete stop-start cycle.
Willem Grooters
Honored Contributor
Solution

Re: CSWS 2.1 log rotation

I'd say: RTFM.

No need to interfere with normal processing, it can be done 'on the fly'.
I had this sequence in my batch procedure to cycle the logs each monday at midnight:

$ @APACHE$COMMON:[000000]APACHE$SETUP
$ httpd -k flush
$ httpd -k new

There have been (or still are) some issues with these commands. But again: consult ALL SWS documentation.
Willem Grooters
OpenVMS Developer & System Manager
WWarren
Advisor

Re: CSWS 2.1 log rotation

Thank you very much for the replies!

The suggested solution seems to work just great!

However, I'm still left with a question.
Should it be the "flush" before the "new" or the "new" before the "flush"? Or maybe a "flush" both before and after the "new"?

I'm unable to find whatever manual that was referred to. The CSWS 2.1 Installation and Configuration Guide doesn't seem to refer to this subject. The CSWS 2.1-1 Release Notes refers to the "flush" and "new" commands, but doesn't go into any specificity on how logs should be rotated. And the Apache documentation subject "Log Rotation", which is quite clear and unambiguous, points to the mistaken approach I initially tried.

Please, when commenting "RTFM" -- name the manual -- and I will be happy to read it and acknowledge my ignorance.
WWarren
Advisor

Re: CSWS 2.1 log rotation

I remain somewhat mystified, but I know enough to proceed.

Thanks again for the replies!