gearmand high cpu after too large job
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gearman |
New
|
Undecided
|
Unassigned |
Bug Description
Our gearmand server started going into a state where it used a lot of CPU.
watching the general log in mysql it seemed to be stuck in a loop running
Prepare INSERT INTO gearman_1_queue (unique_key, function_name, priority, data, when_to_run) VALUES(?, ?, ?, ?, ?)
running with --verbose DEBUG didn't seem to indicate anything, and straceing the main pid showed no activity.
After much digging I found the issue was with max_allowed_packet in mysql. If we submitted a background job that was too big the server would go into this state. Increasing this value fixed our problem.
gearmand should handle this better and return an error to the job submitter instead of going into infinite loop.
# uname -r
2.6.32-
# cat /etc/redhat-release
CentOS release 6.5 (Final)
# rpm -qa gearmand
gearmand-
# gearmand --version
gearmand 1.1.8 - https:/
# cat /etc/sysconfig/
OPTIONS=