RE: [Trac] Open trac log files - too many open files apache error

65 views
Skip to first unread message

Voelker, Bernhard

unread,
Jul 5, 2012, 12:13:04 PM7/5/12
to trac-...@googlegroups.com
Georgios Koloventzos wrote (Thursday, July 05, 2012 5:20 PM):

> We have since some years a Trac installation, but recently we
> encountered a problem with the installation.
> We are using 0.11.7 version.
> We are hosting a large amount of trac instances (more than 1000).
>
> The problem is that the apache is opening the log file of every
> instance (environment) and it does not close them. This leads to
> reach the maximum open files limit.
> For resolving the error we have to restart apache every now and then.

You didn't tell any numbers and on what operating system you are
working with. Are you sure it's the trac.log? Did you check with
lsof? How many files are open? Doesn't raising the limit help?
E.g. doubling with
$ ulimit -n $(( $(ulimit -n) * 2 ))

Have a nice day,
Berny

Georgios Koloventzos

unread,
Jul 5, 2012, 12:25:21 PM7/5/12
to trac-...@googlegroups.com
Hi Berny,

We are using red hat 5/6 with an apache 2.2.3 .
The trac.log files that are open are around 13000 per
backend. 

We have raised the limit but this will eventually come back when
more trac instances are created.

More over having some much open files loads apache and eventually is killed
bu the oom deamon.

Thanks,
Georgios

Voelker, Bernhard

unread,
Jul 6, 2012, 3:09:39 AM7/6/12
to trac-...@googlegroups.com
Georgios Koloventzos wrote (Thursday, July 05, 2012 6:25 PM):

> On Thursday, July 5, 2012 6:13:04 PM UTC+2, berny wrote:
> > Georgios Koloventzos wrote (Thursday, July 05, 2012 5:20 PM):

> > > We have since some years a Trac installation, but recently we
> > > encountered a problem with the installation.
> > > We are using 0.11.7 version.
> > > We are hosting a large amount of trac instances (more than 1000).
> > >
> > > The problem is that the apache is opening the log file of every
> > > instance (environment) and it does not close them. This leads to
> > > reach the maximum open files limit.
> > > For resolving the error we have to restart apache every now and then.

> > You didn't tell any numbers and on what operating system you are
> > working with. Are you sure it's the trac.log? Did you check with
> > lsof? How many files are open? Doesn't raising the limit help?
> > E.g. doubling with
> > $ ulimit -n $(( $(ulimit -n) * 2 ))

> We are using red hat 5/6 with an apache 2.2.3 .
> The trac.log files that are open are around 13000 per
> backend. 
>
> We have raised the limit but this will eventually come back when
> more trac instances are created.
>
> More over having some much open files loads apache and eventually is killed
> bu the oom deamon.

Ouch, that sounds like a bug.
Did you try 0.12.x?

Georgios Koloventzos

unread,
Jul 6, 2012, 4:59:55 AM7/6/12
to trac-...@googlegroups.com
Hi Berny,

We are trying to migrate and the one server we have
I think has the same problem.

When we migrate and we have a homogeneous cluster
I will post what is happening.

It is really weird for me that the files of logs are remaining open.
Even a little event creates a log for an instance this log will stay open ?!.

We have already thought to create a log file per server
in order to see if this will scale down. But with this
the grep will be our only ally when sth happens :D
 
Cheers,
Georgios

Voelker, Bernhard

unread,
Jul 6, 2012, 5:27:54 AM7/6/12
to trac-...@googlegroups.com

Hi Georgios,

 

what about log_type= none or log_type=stderr?

 

http://trac.edgewall.org/wiki/TracIni#logging-section

 

Have a nice day,

Berny

 

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/bEQ2hU_Wm88J.
To post to this group, send email to trac-...@googlegroups.com.
To unsubscribe from this group, send email to trac-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.

Georgios Koloventzos

unread,
Jul 6, 2012, 6:32:58 AM7/6/12
to trac-...@googlegroups.com
Hi Berny,


We have it as log_type = warning
And yes maybe we should log only the 
errors but it is better to have some more logs
when sth happens.

Thanks,
Georgios


On Friday, July 6, 2012 11:27:54 AM UTC+2, berny wrote:

Hi Georgios,

 

what about log_type= none or log_type=stderr?

 

http://trac.edgewall.org/wiki/TracIni#logging-section

 

Have a nice day,

Berny

 

Voelker, Bernhard

unread,
Jul 6, 2012, 6:54:48 AM7/6/12
to trac-...@googlegroups.com

Hi Georgios,

 

yes, that's okay. So maybe log_type=stderr could help.

I didn't try it but I guess the output is then written into apache's error_log

... which is already open and therefore doesn't need to be opened by TRAC again.

 

Have a nice day,

Berny

 

--

You received this message because you are subscribed to the Google Groups "Trac Users" group.

To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/gnhxNXilaHIJ.

Georgios Koloventzos

unread,
Jul 6, 2012, 8:13:16 AM7/6/12
to trac-...@googlegroups.com
Hi Berny,

This sound as a solution and possible.

I will try and tell you.

Thank you very much,
Georgios


On Friday, July 6, 2012 12:54:48 PM UTC+2, berny wrote:

Hi Georgios,

 

yes, that's okay. So maybe log_type=stderr could help.

I didn't try it but I guess the output is then written into apache's error_log

... which is already open and therefore doesn't need to be opened by TRAC again.

 

Have a nice day,

Berny

 


 

Hi Berny,

Reply all
Reply to author
Forward
0 new messages