Large log files unpruned by zzzot #340

Open
opened 2025-04-21 15:07:36 -04:00 by idk · 4 comments
Owner

Opened 6 years ago

Last modified 5 years ago

#1685opendefect

Large log files unpruned by zzzot

Reported by:dgOwned by:
Priority:
major
Milestone:
undecided
Component:
apps/jetty
Version:
0.9.22
Keywords:

Cc:

Parent Tickets:

Sensitive:
no

Description (last modified by dg)

Latest zzzot, 0.9.22.

in jetty.xml:

    <Ref id="RequestLog">
      <Set name="requestLog">
        <New id="RequestLogImpl" class="net.i2p.jetty.I2PRequestLog">
          <Set name="filename">/home/i2p/.i2p/plugins/zzzot/eepsite/logs/zzzot.request.log</Set>
          <Set name="retainDays">1</Set>
          <Set name="append">true</Set>
          <Set name="extended">false</Set>
          <Set name="logCookies">false</Set>
          <Set name="LogTimeZone">GMT</Set>
        </New>
      </Set>
    </Ref>

Logs end up being extremely large and aren't purged.

This fills the harddrive and requires a restart of I2P because of the file handles still held (restart of zzzot doesn't appear to do it).

Subtickets

Opened [6 years ago](/timeline?from=2015-10-15T17%3A59%3A46Z&precision=second "See timeline at Oct 15, 2015 5:59:46 PM") Last modified [5 years ago](/timeline?from=2016-02-18T04%3A26%3A30Z&precision=second "See timeline at Feb 18, 2016 4:26:30 AM") ## [\#1685](/ticket/1685)[open](/query?status=open)[defect](/query?status=!closed&type=defect) # Large log files unpruned by zzzot Reported by:[dg](/query?status=!closed&reporter=dg)Owned by: Priority: [major](/query?status=!closed&priority=major) Milestone: [undecided](/milestone/undecided "No date set") Component: [apps/jetty](/query?status=!closed&component=apps%2Fjetty) Version: [0.9.22](/query?status=!closed&version=0.9.22) Keywords: Cc: Parent Tickets: Sensitive: [no](/query?status=!closed&sensitive=0) ### Description [(last modified by dg)](/ticket/1685?action=diff&version=2 "2015-10-15 18:00:32.687516+00:00") Latest zzzot, 0.9.22. in jetty.xml: ``` <Ref id="RequestLog"> <Set name="requestLog"> <New id="RequestLogImpl" class="net.i2p.jetty.I2PRequestLog"> <Set name="filename">/home/i2p/.i2p/plugins/zzzot/eepsite/logs/zzzot.request.log</Set> <Set name="retainDays">1</Set> <Set name="append">true</Set> <Set name="extended">false</Set> <Set name="logCookies">false</Set> <Set name="LogTimeZone">GMT</Set> </New> </Set> </Ref> ``` Logs end up being extremely large and aren't purged. This fills the harddrive and requires a restart of I2P because of the file handles still held (restart of zzzot doesn't appear to do it). ### Subtickets
idk added this to the undecided milestone 2025-04-21 15:07:36 -04:00
idk added the #1685appsjettyundecided labels 2025-04-21 15:07:36 -04:00
Author
Owner

comment:4 Changed 5 years ago by str4d

Status:new →
open

[comment:4](https://trac.i2p2.de/\#comment:4) Changed [5 years ago](https://trac.i2p2.de//timeline?from=2016-02-18T04%3A26%3A30Z&precision=second "See timeline at Feb 18, 2016 4:26:30 AM") by str4d Status:new → open
Author
Owner

comment:3 Changed 6 years ago by zzz

the zzzot ends up dying every week because of it

please add evidence of file handle problem and relation to logs. don't know why old files would remain open.

it doesn't rotate at all. system runs out of disk, rm logs, utilization remains at 100%, so i2p must be restarted

hard drive full != file handles still held

you're saying you don't have room for a single day's logs? or that it retains more than one day??

i'm not sure, I think it retains more than one day because it doesn't delete the old one the next day?

but doesn't retaindays = 1 mean to save the previous day's file?

so retaindays=0 is valid?

I took it as "keep for 1 day" (i.e. 24 hours)

i looked a couple of places and I see 2 more files than the config. 7 days = 9 files, 90 days = 92 files

You could take it as "retain this for a day after we're done with it" too

looks like they removed the jetty 8 javadocs from the website (grr)

here's the jetty 9 doc ​http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/server/NCSARequestLog.html#setRetainDays-int-

oh okay

it's based on ​http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/util/RolloverFileOutputStream.html

0 means retain forever

i don't see any option to limit the file size

ugh. no way to just say "don't keep it", either

I can't explain why it's N+2 files. N+1 does make sense to me.

so it looks like you need space for a minimum of 3 files, unless you disable logging completely


The extra file may be a Jetty bug, or just the way RolloverFileOutputStream? works, but it won't be fixed in Jetty 8, now unsupported.

[comment:3](https://trac.i2p2.de/\#comment:3) Changed [6 years ago](https://trac.i2p2.de//timeline?from=2015-10-15T18%3A44%3A21Z&precision=second "See timeline at Oct 15, 2015 6:44:21 PM") by zzz <dg> the zzzot ends up dying every week because of it <zzz> please add evidence of file handle problem and relation to logs. don't know why old files would remain open. <dg> it doesn't rotate at all. system runs out of disk, rm logs, utilization remains at 100%, so i2p must be restarted <zzz> hard drive full != file handles still held <zzz> you're saying you don't have room for a single day's logs? or that it retains more than one day?? <dg> i'm not sure, I think it retains more than one day because it doesn't delete the old one the next day? <zzz> but doesn't retaindays = 1 mean to save the previous day's file? <dg> so retaindays=0 is valid? <dg> I took it as "keep for 1 day" (i.e. 24 hours) <zzz> i looked a couple of places and I see 2 more files than the config. 7 days = 9 files, 90 days = 92 files <dg> You could take it as "retain this for a day after we're done with it" too <zzz> looks like they removed the jetty 8 javadocs from the website (grr) <zzz> here's the jetty 9 doc [​http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/server/NCSARequestLog.html#setRetainDays-int](https://trac.i2p2.de/http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/server/NCSARequestLog.html#setRetainDays-int)- <dg> oh okay <zzz> it's based on [​http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/util/RolloverFileOutputStream.html](https://trac.i2p2.de/http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/util/RolloverFileOutputStream.html) <zzz> 0 means retain forever <zzz> i don't see any option to limit the file size <dg> ugh. no way to just say "don't keep it", either <zzz> I can't explain why it's N+2 files. N+1 does make sense to me. <zzz> so it looks like you need space for a minimum of 3 files, unless you disable logging completely * * * The extra file may be a Jetty bug, or just the way RolloverFileOutputStream? works, but it won't be fixed in Jetty 8, now unsupported.
Author
Owner

comment:2 Changed 6 years ago by dg

Description:
modified ( diff)

[comment:2](https://trac.i2p2.de/\#comment:2) Changed [6 years ago](https://trac.i2p2.de//timeline?from=2015-10-15T18%3A00%3A32Z&precision=second "See timeline at Oct 15, 2015 6:00:32 PM") by dg Description: modified ( [diff](https://trac.i2p2.de//ticket/1685?action=diff&version=2))
Author
Owner

comment:1 Changed 6 years ago by dg

Description:
modified ( diff)

[comment:1](https://trac.i2p2.de/\#comment:1) Changed [6 years ago](https://trac.i2p2.de//timeline?from=2015-10-15T18%3A00%3A11Z&precision=second "See timeline at Oct 15, 2015 6:00:11 PM") by dg Description: modified ( [diff](https://trac.i2p2.de//ticket/1685?action=diff&version=1))
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: I2P_Developers/i2p.i2p#340
No description provided.