Page MenuHomePhabricator

Too many queries being killed in XTools?
Closed, ResolvedPublic1 Estimated Story Points

Description

It looks like there have been over 100 queries killed in the past 24 hours according to https://xtools.wmflabs.org/killed_slow_queries.txt, including lots of inserts, which is strange.

We should probably either optimize more queries or raise the timeout.

Event Timeline

kaldari triaged this task as Medium priority.Jul 24 2017, 6:03 PM
kaldari set the point value for this task to 1.
kaldari added subscribers: Samwilson, MusikAnimal.
Samwilson moved this task from Ready to In Development on the Community-Tech-Sprint board.

The inserts are old xtools inserting edit histories into temporary tables, so in the case of users with lots of them can take a lot of time (too much). So it might be good to still kill them.

I've raised the threshold to 2.5 minutes.

One thing that pops up a bit is the big list of queries getting a user's most recent edits on all wikis:

						(SELECT rev_timestamp, 'ruwikibooks' as wiki, page_namespace, page_title, rev_id, rev_comment 
						FROM ruwikibooks_p.revision_userindex
						JOIN ruwikibooks_p.page on page_id = rev_page
						where  rev_user_text = 'MusikAnimal' AND rev_timestamp > '20170623150539' 
						ORDER BY rev_timestamp desc
						Limit 10)
					 UNION 
						(SELECT rev_timestamp, 'svwikinews' as wiki, page_namespace, page_title, rev_id, rev_comment 
						FROM svwikinews_p.revision_userindex
						JOIN svwikinews_p.page on page_id = rev_page
						where  rev_user_text = 'MusikAnimal' AND rev_timestamp > '20170623150539' 
						ORDER BY rev_timestamp desc
						Limit 10)
					UNION
					...

This is querying every wiki on which the user has any edits (as reported by the CentralAuth API) This is from old XTools; in the new version it does this same query in a more efficient way and it's not being killed (that I've seen).

@Samwilson: Sounds like this is mostly resolved. I think we can re-evaluate after the old XTools is killed (when it will be easier to see how many queries are getting killed in the new interface).