Timeout in bug page due to lots of repetitive queries

Bug #360693 reported by Diogo Matsubara
36
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Medium
Unassigned

Bug Description

As seen in OOPS-1199ED202 the BugTask:+index page timeout due to an excessive number of queries. Statement Count is 1167 while 512 of them:

SELECT BugSubscription.bug, BugSubscription.id, BugSubscription.person, BugSubscription.subscribed_by FROM BugSubscription WHERE BugSubscription.person = %s AND BugSubscription.bug = %s LIMIT 1

tags: added: timeout
Revision history for this message
Diogo Matsubara (matsubara) wrote :

Bugs team discussed this bug and since it's not a common case decided to leave it for the end of this cycle or the next one.

Changed in malone:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
William Grant (wgrant) wrote :

You can't just leave some bugs timing out.

Revision history for this message
Björn Tillenius (bjornt) wrote : Re: [Bug 360693] Re: Timeout in bug page due to lots of repetitive queries

On Wed, Apr 15, 2009 at 12:23:35AM -0000, William Grant wrote:
> You can't just leave some bugs timing out.

Which bug is timing out all the time for you? I can't see any indication
that we have such bug. But if we do, we should of course fix it.

Revision history for this message
William Grant (wgrant) wrote : Re: [Bug 360693] Re: Timeout in bug page due to lots of repetitive queries

On Wed, 2009-04-15 at 06:57 +0000, Björn Tillenius wrote:
> On Wed, Apr 15, 2009 at 12:23:35AM -0000, William Grant wrote:
> > You can't just leave some bugs timing out.
>
> Which bug is timing out all the time for you? I can't see any indication
> that we have such bug. But if we do, we should of course fix it.

Clearly some bugs are timing out, or you wouldn't have those OOPSes.

Bug #260918 was timing out consistently last night, but it seems to only
take about 9 seconds to render now. Maybe the cache is hotter.

--
William Grant

Revision history for this message
Eleanor Berger (intellectronica) wrote : Re: [Bug 360693] Re: Timeout in bug page due to lots of repetitive queries

The fix for this bug is to cache the security check. There's no other
reason to check for subscriptions so many times.

Revision history for this message
Diogo Matsubara (matsubara) wrote :

See bug 369922 which I duplicated against this one and I think it has the same root cause. Lots of repetitive queries on bugsubscriptions.

Revision history for this message
komputes (komputes) wrote :

I can confirm getting an "Error: Timeout" timeout page when trying to report a bug against no package with the summary/subject of "Power management notification for bad battery needs redesign". By selecting a package I am able to go on to the next step of viewing possible duplicates. I feel that the timeout caused by searching for similar bugs should not stop the user from reporting the bug.

Revision history for this message
Graham Binns (gmb) wrote : Re: [Bug 360693] Re: Timeout in bug page due to lots of repetitive queries

On Sat, Jul 18, 2009 at 06:27:31PM -0000, komputes wrote:
> I can confirm getting an "Error: Timeout" timeout page when trying to
> report a bug against no package with the summary/subject of "Power
> management notification for bad battery needs redesign". By selecting a
> package I am able to go on to the next step of viewing possible
> duplicates. I feel that the timeout caused by searching for similar bugs
> should not stop the user from reporting the bug.

You're quite right. We're currently working on having the search for
possible dupes happen asynchronously, so even if you try to file a bug
that causes a timeout in the search you'll still be able to actually
file that bug. This is being tracked in bug 358510.

That said, it'd still be nice to solve these timeout problems in
general, so I'll leave this bug open.

Revision history for this message
Deryck Hodge (deryck) wrote :

Does Graham's recent work for Bug #471974 and Bug #487015 make this bug fixed?

I realize bugs can still timeout and we need to chase those individual cases, but shouldn't we now be safe from subscription-caused timeouts? Could we close this bug? I'm inclined to think so, but would like some confirmation from Graham, Tom, or someone, since Tom mentions the security check in a comment here.

Revision history for this message
Graham Binns (gmb) wrote :

At a guess, this is fixed by the duplicate-loading-deferral work. The page certainly no longer times out on edge, so I'm going to mark this Fix committed.

Changed in malone:
status: Triaged → Fix Committed
Gavin Panella (allenap)
Changed in malone:
milestone: none → 2.2.8
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.