Opened 6 years ago

Last modified 6 years ago

#1685 open defect

Large log files unpruned by zzzot

Reported by: dg Owned 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>

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).


Change History (4)

comment:1 Changed 6 years ago by dg

Description: modified (diff)

comment:2 Changed 6 years ago by dg

Description: modified (diff)

comment:3 Changed 6 years ago 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
<dg> oh okay
<zzz> it's based on
<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.

comment:4 Changed 6 years ago by str4d

Status: newopen
Note: See TracTickets for help on using tickets.