Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Trac: Users

Trac hangs viewing ticket

 

 

Trac users RSS feed   Index | Next | Previous | View Threaded


scott.mcnab at gmail

Nov 5, 2009, 7:59 AM

Post #1 of 3 (377 views)
Permalink
Trac hangs viewing ticket

Hello.

We are running several Trac projects with no problems, however, there is one
particular ticket in one project that seems to hang Apache when viewed. The
strange thing is, every other ticket in the same project is perfectly fine,
its just one particular ticket that takes 9 minutes to load!

Here is a capture of the Trac log at debug level when viewing this ticket
(notice the time lapse between the last two lines):

2009-11-05 09:33:15,563 Trac[main] DEBUG: Dispatching <Request "GET
u'/ticket/636'">
2009-11-05 09:33:15,750 Trac[svn_fs] DEBUG: Subversion bindings imported
2009-11-05 09:33:15,758 Trac[api] DEBUG: action controllers for ticket
workflow: ['ConfigurableTicketWorkflow']
2009-11-05 09:33:16,307 Trac[default_workflow] DEBUG:
render_ticket_action_control: action "leave"
2009-11-05 09:33:16,308 Trac[default_workflow] DEBUG:
render_ticket_action_control: action "resolve"
2009-11-05 09:33:16,311 Trac[default_workflow] DEBUG:
render_ticket_action_control: action "reassign"
2009-11-05 09:33:16,582 Trac[default_workflow] DEBUG:
render_ticket_action_control: action "accept"
2009-11-05 09:33:16,585 Trac[session] DEBUG: Retrieving session for ID
u'abcd'
2009-11-05 09:33:16,588 Trac[chrome] DEBUG: Prepare chrome data for request
2009-11-05 09:42:39,607 Trac[main] DEBUG: 587 unreachable objects found.
The ticket itself is very small, with only a couple of lines of text as
ticket content. I cannot see any reason why this ticket should take so long
to load!
Note: during the time the ticket is loading, Apache is consuming 100% CPU.

Has anyone got any idea what might be going on here? We are using Trac
0.11.2.1

Thanks
Scott

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


cboos at neuf

Nov 6, 2009, 5:57 AM

Post #2 of 3 (344 views)
Permalink
Re: Trac hangs viewing ticket [In reply to]

Hello,

Scott McNab wrote:
> Hello.
>
> We are running several Trac projects with no problems, however, there
> is one particular ticket in one project that seems to hang Apache when
> viewed. The strange thing is, every other ticket in the same project
> is perfectly fine, its just one particular ticket that takes 9 minutes
> to load!
>
> Here is a capture of the Trac log at debug level when viewing this
> ticket (notice the time lapse between the last two lines):
>
> 2009-11-05 09:33:15,563 Trac[main] DEBUG: Dispatching <Request "GET
> u'/ticket/636'">
> 2009-11-05 09:33:15,750 Trac[svn_fs] DEBUG: Subversion bindings imported
> 2009-11-05 09:33:15,758 Trac[api] DEBUG: action controllers for ticket
> workflow: ['ConfigurableTicketWorkflow']
> 2009-11-05 09:33:16,307 Trac[default_workflow] DEBUG:
> render_ticket_action_control: action "leave"
> 2009-11-05 09:33:16,308 Trac[default_workflow] DEBUG:
> render_ticket_action_control: action "resolve"
> 2009-11-05 09:33:16,311 Trac[default_workflow] DEBUG:
> render_ticket_action_control: action "reassign"
> 2009-11-05 09:33:16,582 Trac[default_workflow] DEBUG:
> render_ticket_action_control: action "accept"
> 2009-11-05 09:33:16,585 Trac[session] DEBUG: Retrieving session for ID
> u'abcd'
> 2009-11-05 09:33:16,588 Trac[chrome] DEBUG: Prepare chrome data for
> request
> 2009-11-05 09:42:39,607 Trac[main] DEBUG: 587 unreachable objects found.
> The ticket itself is very small, with only a couple of lines of text
> as ticket content. I cannot see any reason why this ticket should take
> so long to load!
> Note: during the time the ticket is loading, Apache is consuming 100% CPU.
>
> Has anyone got any idea what might be going on here? We are using Trac
> 0.11.2.1

If you upgrade Trac to 0.11.5, you'll be able to set the [trac]
debug_sql = true option, which will trace all the SQL activity in the
log. This is costly, so only enable that while debugging. In this case
it could point you to something happening during those 9 minutes.

Also, could it be a plugin doing weird things?
Try to see if the problem persists when disabling all plugins.

If the problem persists, then it's indeed a bug we have to fix in Trac.
That might be an issue with the wiki parser, as in the past we
identified a few weaknesses in the regexps that could lead to
exponential parsing time, so maybe there's still something wrong there.

If you create another ticket with the exact same description, will the
same problem happen with the new ticket?
If yes, then please send us that description (or in private mail if
it's too sensitive for the list). If you need to obfuscate it, make sure
the obfuscated version still triggers the bug.

-- Christian

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


mixedpuppy at gmail

Nov 6, 2009, 10:33 AM

Post #3 of 3 (338 views)
Permalink
Re: Trac hangs viewing ticket [In reply to]

On 05/11/09 7:59 AM, Scott McNab wrote:
> Hello.
> We are running several Trac projects with no problems, however, there is
> one particular ticket in one project that seems to hang Apache when
> viewed. The strange thing is, every other ticket in the same project is
> perfectly fine, its just one particular ticket that takes 9 minutes to load!
> Here is a capture of the Trac log at debug level when viewing this
> ticket (notice the time lapse between the last two lines):
> 2009-11-05 09:33:15,563 Trac[main] DEBUG: Dispatching <Request "GET
> u'/ticket/636'">
> 2009-11-05 09:33:15,750 Trac[svn_fs] DEBUG: Subversion bindings imported
> 2009-11-05 09:33:15,758 Trac[api] DEBUG: action controllers for ticket
> workflow: ['ConfigurableTicketWorkflow']
> 2009-11-05 09:33:16,307 Trac[default_workflow] DEBUG:
> render_ticket_action_control: action "leave"
> 2009-11-05 09:33:16,308 Trac[default_workflow] DEBUG:
> render_ticket_action_control: action "resolve"
> 2009-11-05 09:33:16,311 Trac[default_workflow] DEBUG:
> render_ticket_action_control: action "reassign"
> 2009-11-05 09:33:16,582 Trac[default_workflow] DEBUG:
> render_ticket_action_control: action "accept"
> 2009-11-05 09:33:16,585 Trac[session] DEBUG: Retrieving session for ID
> u'abcd'
> 2009-11-05 09:33:16,588 Trac[chrome] DEBUG: Prepare chrome data for request
> 2009-11-05 09:42:39,607 Trac[main] DEBUG: 587 unreachable objects found.
> The ticket itself is very small, with only a couple of lines of text as
> ticket content. I cannot see any reason why this ticket should take so
> long to load!
> Note: during the time the ticket is loading, Apache is consuming 100% CPU.
> Has anyone got any idea what might be going on here? We are using Trac
> 0.11.2.1
> Thanks
> Scott

First, I'd suggest upgrading to the latest trac and genshi and see if
the problem is resolved.

The last log entry is produced by the gc.collect call in main.py, which
affects every request. That takes some time, certainly NOT 9 minutes.
[I'm stating this by memory, been a while] I removed that call and
gained less than 1 second performance increase (but big enough to be
worth the removal, I think around 150ms)

The weird thing is you're saying this happens *only* on one specific
ticket? In that case I'd look at what the data is, perhaps try to
duplicate the ticket exactly into a new ticket and see if you have the
problem with the new ticket. Does the ticket data have any wiki macros,
unicode chars, etc., that might not be in any other tickets? Ah, you
say it's just a couple lines of simple text. weird.

The 100% cpu is normal, the bulk of that is genshi processing templates.
The trick is keeping the start-to-finish time of a request as low as
possible. Have you customized any templates? What plugins do you have
installed? If either is yes, remove them all, if that fixes is,
reinstate them one at a time until you find the culprit.

Shane

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Trac users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.