Bug 876473 - scalable php-5.3/python-2.6/perl-5.10/ruby-1.8/ruby-1.9 apps' access log keeps growing
Summary: scalable php-5.3/python-2.6/perl-5.10/ruby-1.8/ruby-1.9 apps' access log keep...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Ram Ranganathan
QA Contact: libra bugs
URL:
Whiteboard:
: 918783 923141 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-14 09:10 UTC by jizhao
Modified: 2015-05-14 23:02 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-14 22:25:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description jizhao 2012-11-14 09:10:54 UTC
Description of problem:
Create a scalable php-5.3/python-2.6/perl-5.10/ruby-1.8/ruby-1.9 app and tail its access log. One "GET" record will be generated every 2 seconds. The access log file will keep growing.


Version-Release number of selected component (if applicable):
devenv_2466


How reproducible:
Always


Steps to Reproduce:
1.Create a scalable app
2.Tail its access log
$ rhc tail <appname>
3.
  

Actual results:
<----------access log------------>
- - - [14/Nov/2012:03:58:06 -0500] "GET / HTTP/1.0" 200 5231 "-" "-"
- - - [14/Nov/2012:03:58:08 -0500] "GET / HTTP/1.0" 200 5231 "-" "-"
....
<-------------------------------->


Expected results:
These records shouldn't be generated.


Additional info:

Comment 1 Ram Ranganathan 2012-11-14 19:12:31 UTC
This is expected behaviour -- since the user may want to know who's accessing their apps.  We don't want to break that behaviour

We might want to add some log rollover support in the future. 

For now, the workaround is the user ssh into their app and cleans log files older than 'n' days : 
   
cd $OPENSHIFT_LOGS_DIR   
find . -type f ( -name access_log-* , -name error_log-* ) -mtime +180  
#  Add this to the above command to backup as a gzipped tarball:    | xargs tar -czvf  backup-logs-$(date +%Y%m%d).tar.gz   
#  Add this to the above command to delete 'em:   -exec rm {} \;      or     | xargs rm)    

And if you want to script it, you can do this via the cron cartridge - say a job that runs daily.

Comment 2 Ram Ranganathan 2012-11-14 19:17:54 UTC
For a scalable app, cron may not be an alternative - but its still possible to script it w/ some script that gets started with the app server (post_start_$appservertype) and periodically do the cleanup.

Comment 3 John Poelstra 2012-11-14 19:24:12 UTC
need to create a user story for feature work

Comment 4 Ram Ranganathan 2012-11-14 22:25:04 UTC
Created a user story US 3111 for this:
https://rally1.rallydev.com/#/4670516379d/detail/userstory/9481317081

Comment 5 Luke Meyer 2013-03-12 20:47:34 UTC
*** Bug 918783 has been marked as a duplicate of this bug. ***

Comment 6 Luke Meyer 2013-03-21 19:39:30 UTC
*** Bug 923141 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.