Vocabulary Timeout from +editstatus while trying to edit the assignee

Bug #5847 reported by Dafydd Harries
4
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Medium
Unassigned

Bug Description

"Sorry, Launchpad took too long to process your request."

This has happened to me a few times.

Example OOPS: A286.

Tags: lp-bugs oops
Revision history for this message
Brad Bollenbach (bradb) wrote :

It looks like this might be caused by the person vocabulary used for the assignee field on that page, and that using the assignee name "carlos" is triggering the problem.

Here are some snippets from the RequestExpired errors that may be a starting point for optimization:

Oops-Id: OOPS-A290
Exception-Type: RequestExpired
Exception-Value: (('\n SELECT DISTINCT Person.id, Person.displayname FROM Person\n LEFT OUTER JOIN EmailAddress ON Person.id = EmailAddress.person\n WHERE \n (teamowner IS NOT NULL OR (\n teamowner
IS NULL AND password IS NOT NULL AND\n merged IS NULL AND EmailAddress.status = 4\n ))\n AND Person.id = 98 ORDER BY displayname, id',), {})
Date: 2005-12-16T17:18:59.646891+00:00
User: Dafydd Harries, 860, Dafydd Harries, None None
URL: https://launchpad.net/products/launchpad/+bug/4031/+editstatus

Oops-Id: OOPS-A288
Exception-Type: RequestExpired
Exception-Value: (('SELECT EmailAddress.id, EmailAddress.status, EmailAddress.person, EmailAddress.email FROM EmailAddress WHERE ((EmailAddress.person = 98) AND (EmailAddress.status = 4)) ORDER BY email',), {})
Date: 2005-12-16T17:08:39.701432+00:00
User: Dafydd Harries, 860, Dafydd Harries, None None
URL: https://launchpad.net/products/launchpad/+bug/4031/+editstatus

Changed in malone:
assignee: nobody → bradb
status: New → Accepted
Revision history for this message
Guilherme Salgado (salgado) wrote :

Both queries displayed in the traceback run almost instantaneously on production. My guess is that there's another query that run before these ones that takes too long to run and thus leaves no time for these ones to run. This will be easy to check when bug 5849 gets fixed

Christian Reis (kiko)
Changed in malone:
assignee: bradb → nobody
Revision history for this message
Stuart Bishop (stub) wrote :

The query should be refactored to be something like the following:

SELECT Person.id, Person.displayname, Person.name
FROM ValidPersonOrTeamCache
JOIN Person ON Person.id = ValidPersonOrTeamCache.id
LEFT OUTER JOIN EmailAddress ON EmailAddress.person = Person.id
WHERE
Person.fti @@ ftq('a')
OR (lower(email) LIKE 'a' || '%' AND status IN (2, 4))
ORDER BY person_sort_key(displayname, name) LIMIT 100

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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