I'm using Gearman Job server in my project. I use 'gearman-ruby' gem.
There is a queue of tasks in app. One task have 4 parts.
Appropriately I have 4 workers to solve this parts of task.
My system solve 1 task in 10minutes without gearman. But when I use gearman, time to solve 10 tasks are 2-3 hours :(
Gearman queue are located in mysql. The queue are overflows.
Cron starts clients, which set tasks. one task - parse one page. 1st worker - get page(init), 2nd - get photos(images), 3rd - get comments(text), 4rd - get characteristics(text). 1st worker get pages, other workers parse different data from this pages.
gearman configs:
$cat /etc/sysconfig/gearmand
## Settings for gearmand
OPTIONS="--listen=127.0.0.1
--job-retries=3 \
--log-file=/var/log/gearman.log \
--queue-type=MySQL \
--mysql-host=localhost \
--mysql-port=3306 \
--mysql-db=gearman \
--mysql-table=queue"
$gearmand --version
gearmand 0.35
Help me please to setup gearman for speed working