Page MenuHomePhabricator

Phabricator search times out
Closed, DuplicatePublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

What happens?:

  • An error appears:

Phab search timeout.png (839×1 px, 6 KB)

What should have happened instead?:

  • Search should have been completed successfully.

Event Timeline

"Wikimedia error"? Don't think this appears on Phab. T258803#7378611, where I had mentioned this task, appears to be the design of a typical Phab error.

"Wikimedia error"? Don't think this appears on Phab. T258803#7378611, where I had mentioned this task, appears to be the design of a typical Phab error.

The 'upstream request timeout' does not come from Phabricator. I believe it comes from the cache proxies that sit in front of Phab. What you can see on the other task is more Phab like.

Marostegui triaged this task as Medium priority.Sep 26 2021, 2:48 PM
Marostegui edited projects, added Release-Engineering-Team; removed SRE.
Marostegui added subscribers: mmodell, Marostegui.

It does eventually work for me (aka: no timeouts, but it does take a looong time).
I have found this query:

| 440482799 | phuser          | 10.64.48.42:50822    | phabricator_repository   | Query       |       9 | Sending data                                                          | SELECT `commit`.*, IF(`ft_rank`.termCorpus LIKE '% Mediawiki in %', 2, 0) + IF(`ft_rank`.normalCorpus LIKE '% mediawiki in %', 1, 0) + 0 AS `_ft_rank`, ft_doc.epochCreated AS `_ft_epochCreated`, ft_doc.epochModified AS `_ft_epochModified`, ft_rank.rawCorpus AS `rawCorpus` FROM `repository_commit` `commit` JOIN `repository_commit_fdocument` ft_doc ON ft_doc.objectPHID = `commit`.`phid` JOIN `repository_commit_fngrams` `ftngram_1` ON `ftngram_1`.documentID = ft_doc.id AND `ftngram_1`.ngram = ' in' JOIN `repository_commit_fngrams` `ftngram_2` ON `ftngram_2`.documentID = ft_doc.id AND `ftngram_2`.ngram = ' me' JOIN `repository_commit_fngrams` `ftngram_3` ON `ftngram_3`.documentID = ft_doc.id AND `ftngram_3`.ngram = 'awi' JOIN `repository_commit_fngrams` `ftngram_4` ON `ftngram_4`.documentID = ft_doc.id AND `ftngram_4`.ngram = 'dia' JOIN `repository_commit_fngrams` `ftngram_5` ON `ftngram_5`.documentID = ft_doc.id AND `ftngram_5`.ngram = 'edi' JOIN `repository_commit_fngrams` `ftngram_6` ON `ftngram_6`.documentID = ft_doc.id AND `ftngram_6`.ngram = 'iaw' JOIN `repository_commit_fngrams` `ftngram_7` ON `ftngram_7`.documentID = ft_doc.id AND `ftngram_7`.ngram = 'iki' JOIN `repository_commit_fngrams` `ftngram_8` ON `ftngram_8`.documentID = ft_doc.id AND `ftngram_8`.ngram = 'in ' JOIN `repository_commit_fngrams` `ftngram_9` ON `ftngram_9`.documentID = ft_doc.id AND `ftngram_9`.ngram = 'ki ' JOIN `repository_commit_fngrams` `ftngram_10` ON `ftngram_10`.documentID = ft_doc.id AND `ftngram_10`.ngram = 'med' JOIN `repository_commit_fngrams` `ftngram_11` ON `ftngram_11`.documentID = ft_doc.id AND `ftngram_11`.ngram = 'wik' JOIN `repository_commit_ffield` `ftfield_1` ON ft_doc.id = `ftfield_1`.documentID
          AND `ftfield_1`.fieldKey = 'full' LEFT JOIN `repository_commit_ffield` `ft_rank` ON ft_doc.id = `ft_rank`.documentID
          AND `ft_rank`.fieldKey = 'titl' WHERE ((((`ftfield_1`.termCorpus LIKE '% Mediawiki in %')) OR ((`ftfield_1`.normalCorpus LIKE '% mediawiki in %')))) GROUP BY `commit`.phid  ORDER BY `_ft_rank` DESC, `_ft_epochModified` DESC, `commit`.`id` DESC LIMIT 101
mysql:root@localhost [phabricator_repository]> show explain for 440482799;
+------+-------------+------------+--------+----------------------+-------------------+---------+---------------------------------------------------+---------+-----------------------------------------------------------+
| id   | select_type | table      | type   | possible_keys        | key               | key_len | ref                                               | rows    | Extra                                                     |
+------+-------------+------------+--------+----------------------+-------------------+---------+---------------------------------------------------+---------+-----------------------------------------------------------+
|    1 | SIMPLE      | ftngram_6  | ref    | key_ngram,key_object | key_ngram         | 12      | const                                             | 1086166 | Using where; Using index; Using temporary; Using filesort |
|    1 | SIMPLE      | ftngram_3  | ref    | key_ngram,key_object | key_ngram         | 16      | const,phabricator_repository.ftngram_6.documentID |       1 | Using where; Using index                                  |
|    1 | SIMPLE      | ftngram_9  | ref    | key_ngram,key_object | key_ngram         | 16      | const,phabricator_repository.ftngram_6.documentID |       1 | Using where; Using index                                  |
|    1 | SIMPLE      | ftngram_10 | ref    | key_ngram,key_object | key_ngram         | 16      | const,phabricator_repository.ftngram_6.documentID |       1 | Using where; Using index                                  |
|    1 | SIMPLE      | ftngram_4  | ref    | key_ngram,key_object | key_ngram         | 16      | const,phabricator_repository.ftngram_6.documentID |       1 | Using where; Using index                                  |
|    1 | SIMPLE      | ftngram_5  | ref    | key_ngram,key_object | key_ngram         | 16      | const,phabricator_repository.ftngram_6.documentID |       1 | Using where; Using index                                  |
|    1 | SIMPLE      | ftngram_2  | ref    | key_ngram,key_object | key_ngram         | 16      | const,phabricator_repository.ftngram_6.documentID |       1 | Using where; Using index                                  |
|    1 | SIMPLE      | ftngram_7  | ref    | key_ngram,key_object | key_ngram         | 16      | const,phabricator_repository.ftngram_6.documentID |       1 | Using where; Using index                                  |
|    1 | SIMPLE      | ftngram_8  | ref    | key_ngram,key_object | key_ngram         | 16      | const,phabricator_repository.ftngram_6.documentID |       1 | Using where; Using index                                  |
|    1 | SIMPLE      | ftngram_11 | ref    | key_ngram,key_object | key_ngram         | 16      | const,phabricator_repository.ftngram_6.documentID |       1 | Using where; Using index                                  |
|    1 | SIMPLE      | ftngram_1  | ref    | key_ngram,key_object | key_ngram         | 16      | const,phabricator_repository.ftngram_6.documentID |       1 | Using where; Using index                                  |
|    1 | SIMPLE      | ft_doc     | eq_ref | PRIMARY,key_object   | PRIMARY           | 4       | phabricator_repository.ftngram_6.documentID       |       1 |                                                           |
|    1 | SIMPLE      | commit     | eq_ref | phid                 | phid              | 66      | phabricator_repository.ft_doc.objectPHID          |       1 |                                                           |
|    1 | SIMPLE      | ftfield_1  | eq_ref | key_documentfield    | key_documentfield | 22      | phabricator_repository.ftngram_6.documentID,const |       1 | Using index condition; Using where                        |
|    1 | SIMPLE      | ft_rank    | eq_ref | key_documentfield    | key_documentfield | 22      | phabricator_repository.ftngram_6.documentID,const |       1 | Using where                                               |
+------+-------------+------------+--------+----------------------+-------------------+---------+---------------------------------------------------+---------+-----------------------------------------------------------+
15 rows in set, 1 warning (0.001 sec)

It seems to be a search for Mediawiki-in across all documents (not just Tasks).

I am guessing it is similar to T258803 which is about searching for gerrit. A comment there indicates it times out when being logged out. If I try Mediawiki-in search when logged in, I get a result.

We should probably mark it as a duplicate of T258803.