Test details

4 views
Skip to first unread message

Drakon

unread,
Jun 15, 2010, 2:46:40 AM6/15/10
to gearman
Now problem is actual.
I can describe details of starvation.
When it's happened, all worker processes in 'SN' linux state:

drakon # ps ax | grep php
22069 pts/1 S+ 0:00 grep --colour=auto php
22964 ? SN 0:00 /usr/bin/php -f /var/www/infoskidka.ru/www/
cli.php cron per_minute
22977 ? SN 0:22 /usr/bin/php -f /var/www/infoskidka.ru/www/
cli.php gearman_worker_advance
22978 ? SN 0:31 /usr/bin/php -f /var/www/infoskidka.ru/www/
cli.php gearman_worker_advance
22979 ? SN 0:29 /usr/bin/php -f /var/www/infoskidka.ru/www/
cli.php gearman_worker_advance
22980 ? SN 0:33 /usr/bin/php -f /var/www/infoskidka.ru/www/
cli.php gearman_worker_advance
22981 ? SN 0:30 /usr/bin/php -f /var/www/infoskidka.ru/www/
cli.php gearman_worker_advance
22982 ? SN 0:20 /usr/bin/php -f /var/www/infoskidka.ru/www/
cli.php gearman_worker_advance
22983 ? SN 0:24 /usr/bin/php -f /var/www/infoskidka.ru/www/
cli.php gearman_worker_advance

S = Interruptible sleep (waiting for an event to complete)
N = low-priority (nice to other users)

I write output stream of all workers to files and in all files I see
phrase '[g_advance_url] finished' that means that task finished.
Status of gearman in this moment:

drakon # telnet 127.0.0.1 4730
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
status
sync_url 0 0 0
finish 0 0 7
advance_url 0 0 7
.

It's means that all tasks finished. But in logs I see that process
"cli.php cron per_minute" created 225 tasks and only 131 of them have
completed.

I think it looks like the problems in PECL module.
Reply all
Reply to author
Forward
0 new messages