LP package accept U/I timeouts too short for large packages

Bug #437037 reported by Scott Kitterman
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Michael Nelson

Bug Description

I tried to accept kdebase-workspace quite a number of times and got a timeout each time. Before and after I accepted one or more smaller packages without issue. The most recent OOPS was:

Timeout error
 Sorry, something just went wrong in Launchpad.
 We’ve recorded what happened, and we’ll fix it as soon as possible. Apologies for the inconvenience.
 Trying again in a couple of minutes might work.
 (Error ID: OOPS-1365C665)

URL in question is:

https://launchpad.net/ubuntu/jaunty/+queue?queue_state=1

Related branches

Revision history for this message
Scott Kitterman (kitterman) wrote :

Note: The web U/I never worked for kdebase-workspace, it was accepted via shell access by someone else.

Also kde4libs:

Timeout error
 Sorry, something just went wrong in Launchpad.
 We’ve recorded what happened, and we’ll fix it as soon as possible. Apologies for the inconvenience.
 Trying again in a couple of minutes might work.
 (Error ID: OOPS-1365C2235)

tags: added: queue-page timeout
Changed in soyuz:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Michael Nelson (michael.nelson) wrote :

As Celso pointed out on bug 332529, the problem is still the query that simply asks for all the SPR's for a given source package name - for some reason it's taking around 4-5s and is executed 5 times. I'll try to find out why.

Changed in soyuz:
status: Triaged → In Progress
assignee: nobody → Michael Nelson (michael.nelson)
milestone: none → 3.1.10
Revision history for this message
Michael Nelson (michael.nelson) wrote :

OK, in that specific example, we've got ~500 SPRs being instantiated just to get their id's for the in-clause of the next sql query. So I can do one really simple fix for the moment, that will not instantiate the SPRs but rather just get a list of ids (I'm guessing this is why the query *appears* to take so long - the object instantiation - but I'll verify that with cprov later).

It would still be good to find out why this query is being run 5 times... if it's worthwhile, I can continue looking into that as well.

Revision history for this message
Michael Nelson (michael.nelson) wrote :

So there will be a branch landing soon on edge that combines the two separate queries (the collection of all SPR ids, and then the builds for those SPRs) into one query. This should substantially reduce the time required for SPR.createBuild().

I didn't realise that Celso had already mentioned the cause of the multiple calls (one for each arch). I've taken a look, and it would also be possible for us to optionally pass the estimated build duration into SPR.createBuild() and calculating it during SPPH.createMissingBuilds() once for all architectures. We'll see if that's necessary.

Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 437037] Re: LP package accept U/I timeouts too short for large packages

This page seems to pretty regularly suffer regressions like this. If you
can figure out the root of it, I think it would be quite worthwhile.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

The code behind the main page hasn't changed since the last optimisation. I know of two problems, but these are not regressions as such since we've not made changes:

 1. The page has trouble rendering if there are lots of packages with custom files attached
 2. When accepting packages that close bugs with a lot of subscribers, it will time out because the code is busy emailing lots of people.

The first one is easier to fix than the latter.

Revision history for this message
Scott Kitterman (kitterman) wrote :

All I know is it breaks, bugs get file, it gets fixed, wait a few months
and it's broken again. While there may not be a regression in the code,
there is most definitely a regession in my ability to get work done.

Revision history for this message
Diogo Matsubara (matsubara) wrote : Bug fixed by a commit
Changed in soyuz:
status: In Progress → Fix Committed
Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 437037] Re: LP package accept U/I timeouts too short for large packages

Thank you for the quick reaction on this. Does fix committed mean it's on
edge?

Revision history for this message
Michael Nelson (michael.nelson) wrote :

In a few minutes yes :). Assuming edge is updating as per-normal today, we should soon see > 9587 at the bottom of the edge page.

If you have other packages with lots of previous SPRs (ie. the kde4libs had ~500), try them out! If you still get an oops - re-open this bug and I'll look for further performance enhancements.

Thanks!

Revision history for this message
Scott Kitterman (kitterman) wrote :

Does SPR equal Bug?

Revision history for this message
Michael Nelson (michael.nelson) wrote :

Sorry, SourcePackageReleases. And it looks as though edge has not yet updated too :/.

Changed in soyuz:
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.