mysql> EXPLAIN SELECT /* JobQueueDB::claimRandom 127.0.0.1 */ * FROM `job` WHERE job_cmd = 'MessageGroupStatesUpdaterJob' AND job_token = '' AND (job_random <= '2108540693') ORDER BY job_random DESC LIMIT 1; +----+-------------+-------+------+----------------------------------------+---------------+---------+-------------+-------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+-------+------+----------------------------------------+---------------+---------+-------------+-------+-------------+ | 1 | SIMPLE | job | ref | job_cmd,job_cmd_token,job_cmd_token_id | job_cmd_token | 96 | const,const | 43440 | Using where | +----+-------------+-------+------+----------------------------------------+---------------+---------+-------------+-------+-------------+ 1 row in set (0.00 sec) mysql> SELECT /* JobQueueDB::claimRandom 127.0.0.1 */ * FROM `job` WHERE job_cmd = 'MessageGroupStatesUpdaterJob' AND job_token = '' AND (job_random <= '2108540693') ORDER BY job_random DESC LIMIT 1;+--------+------------------------------+---------------+--------------------------------------------------------+----------------+------------+------------+-----------+---------------------+---------------------------------+--------------+ | job_id | job_cmd | job_namespace | job_title | job_timestamp | job_params | job_random | job_token | job_token_timestamp | job_sha1 | job_attempts | +--------+------------------------------+---------------+--------------------------------------------------------+----------------+------------+------------+-----------+---------------------+---------------------------------+--------------+ | 447774 | MessageGroupStatesUpdaterJob | 1202 | Konsolekalendar-e2ca93-Add_location_to_incidence_(f/en | 20121201204852 | a:0:{} | 2108426131 | | NULL | f78vrjeo5e8f17ackthos9uhjzw686y | 0 | +--------+------------------------------+---------------+--------------------------------------------------------+----------------+------------+------------+-----------+---------------------+---------------------------------+--------------+ 1 row in set (3.62 sec)
It's going to take ages to clear all the jobs if picking each one takes 3 seconds.
php maintenance/showJobs.php
86324
Version: 1.21.x
Severity: critical
See Also: