Page 2 of 2

Re: httpd logs growing heavily

Posted: Mon Jun 03, 2013 3:56 am
by HAL
Thanks for your comments. Under vi /etc/php.ini I can see the date.timezone as commented, as illustrated below.
[Date]
; Defines the default timezone used by the date functions
; http://www.php.net/manual/en/datetime.c ... e.timezone
;date.timezone =

From the logs grep -R -i "log" /etc/httpd/* I can see messages "We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /usr/local/nagiosxi/html/includes/utils-status.inc.php on line 70, referer: http://10.202.21.19/nagiosxi/includes/c ... &dest=auto".
Shall I uncomment date.timezone under vi /etc/php.ini and set it as date.timezone ='Europe/Berlin'.

Kindly suggest.

Post 2:

I get below output on firing date command.
Mon Jun 3 10:59:02 CEST 2013

As such we are using time zone Europe/Oslo in our Hoegh Enivornment, so then I should set date.timezone ='Europe/Oslo' please suggest.

Aslo I believe after after making the said changes, httpd logs won't grow so tremendously with those timezone error records, kindly comment.

Last I believe that after all these changes, if I restart httpd services, I can expect to have proper log rotation of logs, with writing current records to new logs and I can delete the old grown logs.
-rw-r--r-- 1 root root 49G May 23 16:11 error_log-20121007
-rw-r--r-- 1 root root 3.6G May 23 16:11 access_log-20121007

Re: httpd logs growing heavily

Posted: Mon Jun 03, 2013 11:06 am
by abrist
Please follow the timezone document to get your datetime issues sorted out: http://assets.nagios.com/downloads/nagi ... m_Time.pdf

Re: httpd logs growing heavily

Posted: Tue Jun 04, 2013 6:16 am
by HAL
Thanks for the comments. We would have our maintenance task this month 22nd June, so I was planning to make all the suggested changes that day. PFB steps and kindly point out anything to be altered in the plan.
1.With regards to timezone conflicts through PHP functions, we have to set ZONE="Europe/Oslo" under /etc/php.ini through date.timezone=Europe/Oslo as it is set already under /etc/sysconfig/clock.
2. Stop Apache Server using service httpd stop.
3. Move error_log-20121007 and access_log-20121007 to some temporary folder.
4. Start Apache Server using service httpd start.
5. Verify the status of Apache Server using service httpd status.
6. Verify that the error_log and access_log are getting rotated that is they should be in use and the old logs name gets appended with date suffix.

Re: httpd logs growing heavily

Posted: Tue Jun 04, 2013 2:06 pm
by lmiltchev
This sounds right.

Re: httpd logs growing heavily

Posted: Tue Jun 04, 2013 2:07 pm
by sreinhardt
Yes this sounds about right, specifically for the timezone stuff, unfortunately they don't talk to each other (php and local system) and it does make a difference. Let us know how it goes!

Re: httpd logs growing heavily

Posted: Mon Jun 24, 2013 7:02 am
by HAL
The activity went smoothly. Thank a lot for the guidance.

Re: httpd logs growing heavily

Posted: Mon Jun 24, 2013 9:21 am
by slansing
Great! Anything else regarding this?

Re: httpd logs growing heavily

Posted: Mon Jul 01, 2013 2:07 am
by HAL
Nothing more, believe we are good now. Thanks !!!