Page 1 of 1

Maximium Size of timetrex.log

Posted: Mon Jul 27, 2015 7:35 am
by EricM
It seems like the log file (timetrex.log) has a maximum size of 2,147,483,647 bytes.

I've only hit the limit with extremely verbose logging turned on in a heavy use environment. Normally the logs would rotate far before that.

I'm not sure if this is a limit in my version of PHP or Timetrex, but it's a quirk that might be useful for others to note.

Re: Maximium Size of timetrex.log

Posted: Mon Jul 27, 2015 7:51 am
by shaunw
TimeTrex doesn't have any mechanism to restrict writing to 2gb files, so its PHP or the operating system that is causing it.

Re: Maximium Size of timetrex.log

Posted: Mon Jul 27, 2015 8:02 am
by EricM
It seems to be a limit in all 32 bit versions of PHP, including the version bundled with Timetrex.

It's a rather rare issue, but it's useful to note because once the log file hit the limit, Timetrex stopped responding and I had to manually restart it.

Restarting the timetrex service seemed to force a log rotate, but I'm not sure when that is normally done.

Re: Maximium Size of timetrex.log

Posted: Mon Jul 27, 2015 8:28 am
by shaunw
Under normal circumstances logging should only be enabled for short periods of time to help diagnose a problem, then disabled again.

Re: Maximium Size of timetrex.log

Posted: Mon Jul 27, 2015 9:03 am
by EricM
Right, that's what I normally do, but I've been trying to catch a bug that only exhibited itself about once a week and discovered this other logging bug along the way.

As a temporary fix I set up an extra cron job to delete the logs daily.