Bug 876473 - scalable php-5.3/python-2.6/perl-5.10/ruby-1.8/ruby-1.9 apps' access log keeps growing
scalable php-5.3/python-2.6/perl-5.10/ruby-1.8/ruby-1.9 apps' access log keep...
Status: CLOSED UPSTREAM
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Ram Ranganathan
libra bugs
: FutureFeature
: 918783 923141 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-14 04:10 EST by jizhao
Modified: 2015-05-14 19:02 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-14 17:25:04 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description jizhao 2012-11-14 04:10:54 EST
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 14:12:31 EST
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 14:17:54 EST
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 14:24:12 EST
need to create a user story for feature work
Comment 4 Ram Ranganathan 2012-11-14 17:25:04 EST
Created a user story US 3111 for this:
https://rally1.rallydev.com/#/4670516379d/detail/userstory/9481317081
Comment 5 Luke Meyer 2013-03-12 16:47:34 EDT
*** Bug 918783 has been marked as a duplicate of this bug. ***
Comment 6 Luke Meyer 2013-03-21 15:39:30 EDT
*** 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.