Last modified: 2014-01-03 15:46:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T50873, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 48873 - CheckUser queries not working (timing out)
CheckUser queries not working (timing out)
Status: RESOLVED WORKSFORME
Product: MediaWiki extensions
Classification: Unclassified
CheckUser (Other open bugs)
master
All All
: High major (vote)
: ---
Assigned To: Nobody - You can work on this!
: performance
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-27 20:20 UTC by Sam Reed (reedy)
Modified: 2014-01-03 15:46 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Sam Reed (reedy) 2013-05-27 20:20:37 UTC
I was trying to use it on wikidatawiki to see user agents for a squid apparently editing. None of the queries ever gave any useful results, mostly timing out at the squid/nginx proxies.

I'm guessing it's doing a long slow query that doesn't finish because it takes too long

Doing a bounded query worked fine (directly to the database)

select * from cu_changes where cuc_user = 0 and cuc_user_text = '10.64.0.127' order by cuc_timestamp DESC limit 15
Comment 1 Andre Klapper 2013-06-13 19:10:27 UTC
Reedy: Can this problem still be seen? 
What are exact steps / an example to reproduce?
Comment 2 Sam Reed (reedy) 2013-06-24 16:30:11 UTC
https://www.wikidata.org/wiki/Special:CheckUser

IP address: 10.64.0.127

Press Check


Most users won't be able to access CheckUser
Comment 3 Andre Klapper 2013-09-18 16:12:59 UTC
(In reply to comment #2)
> https://www.wikidata.org/wiki/Special:CheckUser
> IP address: 10.64.0.127
> Press Check
> Most users won't be able to access CheckUser

Yeah, cannot recheck either. This needs retesting by a user with rights.
Comment 4 Marcin Cieślak 2013-09-18 16:33:11 UTC
Cannot reproduce this using plwikipedia checkuser, which suggests it is because lots of entries in the database. Are you doing "get edits" or "get users" check?
Comment 5 Marcin Cieślak 2013-09-18 17:29:15 UTC
Does adding some time limit help a bit?

Here is the actual query if using "get edits":

SELECT  
 cuc_namespace,
 cuc_title,
 cuc_user,
 cuc_user_text,
 cuc_comment,
 cuc_actiontext,
 cuc_timestamp,
 cuc_minor,
 cuc_page_id,
 cuc_type,
 cuc_this_oldid,
 cuc_last_oldid,
 cuc_ip,
 cuc_xff,cuc_agent 
FROM `cu_changes` 
FORCE INDEX (cuc_ip_hex_time) 
WHERE (cuc_ip_hex = '0A40007F') AND (1 = 1) 
ORDER BY cuc_timestamp DESC LIMIT 5001

when doing "get users":

SELECT
 cuc_user_text,
 cuc_timestamp,
 cuc_user,
 cuc_ip,
 cuc_agent,
 cuc_xff 
FROM `cu_changes` 

FORCE INDEX (cuc_ip_hex_time) 
WHERE (cuc_ip_hex = '0A40007F') AND (1 = 1) 
ORDER BY cuc_timestamp DESC LIMIT 10000

can you post EXPLAIN of those queries?
Comment 6 Sam Reed (reedy) 2013-09-18 17:41:37 UTC
mysql:wikiadmin@db1058 [wikidatawiki]> explain  SELECT    cuc_namespace,  cuc_title,  cuc_user,  cuc_user_text,  cuc_comment,  cuc_actiontext,  cuc_timestamp,  cuc_minor,  cuc_page_id,  cuc_type,  cuc_this_oldid,  cuc_last_oldid,  cuc_ip,  cuc_xff,cuc_agent  FROM `cu_changes`  FORCE INDEX (cuc_ip_hex_time)  WHERE (cuc_ip_hex = '0A40007F') AND (1 = 1)  ORDER BY cuc_timestamp DESC LIMIT 5001\G
*************************** 1. row ***************************
           id: 1
  select_type: SIMPLE
        table: cu_changes
         type: ref
possible_keys: cuc_ip_hex_time
          key: cuc_ip_hex_time
      key_len: 258
          ref: const
         rows: 1
        Extra: Using where
1 row in set (0.00 sec)



mysql:wikiadmin@db1058 [wikidatawiki]> explain SELECT  cuc_user_text,  cuc_timestamp,  cuc_user,  cuc_ip,  cuc_agent,  cuc_xff  FROM `cu_changes`   FORCE INDEX (cuc_ip_hex_time)  WHERE (cuc_ip_hex = '0A40007F') AND (1 = 1)  ORDER BY cuc_timestamp DESC LIMIT 10000\G
*************************** 1. row ***************************
           id: 1
  select_type: SIMPLE
        table: cu_changes
         type: ref
possible_keys: cuc_ip_hex_time
          key: cuc_ip_hex_time
      key_len: 258
          ref: const
         rows: 1
        Extra: Using where
1 row in set (0.00 sec)
Comment 7 Sam Reed (reedy) 2013-09-18 18:28:20 UTC
Seems this might have been fixed by purging old rows

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links