Maximium Size of timetrex.log

Discussion for TimeTrex open source community developers.
Post Reply
EricM
Posts: 29
Joined: Wed Jan 16, 2013 2:22 pm

Maximium Size of timetrex.log

Post by EricM » Mon Jul 27, 2015 7:35 am

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.

shaunw
Posts: 7360
Joined: Tue Sep 19, 2006 2:22 pm

Re: Maximium Size of timetrex.log

Post by shaunw » Mon Jul 27, 2015 7:51 am

TimeTrex doesn't have any mechanism to restrict writing to 2gb files, so its PHP or the operating system that is causing it.

EricM
Posts: 29
Joined: Wed Jan 16, 2013 2:22 pm

Re: Maximium Size of timetrex.log

Post by EricM » Mon Jul 27, 2015 8:02 am

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.

shaunw
Posts: 7360
Joined: Tue Sep 19, 2006 2:22 pm

Re: Maximium Size of timetrex.log

Post by shaunw » Mon Jul 27, 2015 8:28 am

Under normal circumstances logging should only be enabled for short periods of time to help diagnose a problem, then disabled again.

EricM
Posts: 29
Joined: Wed Jan 16, 2013 2:22 pm

Re: Maximium Size of timetrex.log

Post by EricM » Mon Jul 27, 2015 9:03 am

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.

Post Reply