[rt-users] We found a merged ticket

Mario Aeby mario.aeby at dkf.unibe.ch
Tue Feb 12 08:07:36 EST 2008


Hi there

(Yes, I looked through the mailing list, found some similar issues,  
used google - other people seem to have noticed the error, but no  
final solution was mentioned yet)

We're running RT 3.6.5 on Debian GNU/Linux 2.6.18-6-686 with Apache  
2.2.3-4+etch3, MySQL 5.0.51-3 and Perl 5.8.8-7etch1. In the recent  
weeks RT got slower and slower from day to day. We're handling around  
1000 Tickets right now.

After turning on debug messages while requesting the details of one  
single ticket, the log got filled with tons of such messages:

- --
[Tue Feb 12 00:23:55 2008] [debug]: We found a merged ticket.935/903  
(/home/rt3/lib/RT/Ticket_Overlay.pm:273)
... 283 lines with similar meaning ...
[Tue Feb 12 00:25:34 2008] [debug]: We found a merged ticket.1008/903  
(/home/rt3/lib/RT/Ticket_Overlay.pm:273)
- --

It took the page more than one and a half minute to load.

I had a look at "Ticket_Overlay.pm" and found the following code  
structure:

- --
sub Load {
	...
	#If we're merged, resolve the merge.
     if ( ( $self->EffectiveId ) and ( $self->EffectiveId != $self- 
 >Id ) ) {
         $RT::Logger->debug ("We found a merged ticket.". $self- 
 >id ."/".$self->EffectiveId);
         return ( $self->Load( $self->EffectiveId ) );
     }
     ...
}
- --

In my opinion $self->Load( $self->EffectiveId ) causes an infinite  
loop when there are tickets merged into the current one. Indeed, the  
programmer seems to have noticed this loop already when reading a  
comment at the beginning of the method:

- --
#TODO modify this routine to look at EffectiveId and do the recursive  
load
# thing. be careful to cache all the interim tickets we try so we  
don't loop forever.
- --

<http://svn.bestpractical.com/cgi-bin/index.cgi/bps/view/rt/branches/ 
3.6-RELEASE/lib/RT/Ticket_Overlay.pm>

Is there anything we can do to make RT fast again? (Please don't  
suggest throwing CPU, RAM etc. at it - IMHO it looks like a classic  
software bug which cannot resolved with better hardware).

Thank you!
Best regards
Mario



More information about the rt-users mailing list