[Erp5-dev] activities are not being fired at all
Pelletier Vincent
vincent at nexedi.com
Wed Oct 31 14:21:49 CET 2007
Le Mercredi 31 Octobre 2007 12:36, Jacek Medrzycki a écrit :
> We have noticed that on our site (at revision 27264) activities are not
> being invoked. All activities are in state -1. When invoked by hand,
> hovewer, they execute with no errors.
Those activities might be waiting for a tag to disapear from activity list.
For example, an activity waiing for a reindex to be finished on a given
object.
Activity dependencies (ie, waiting for a tag or a method_id) are computed at
distribution time, which would explain the presence of activities with -1 as
processing_node. Invoking them bypasses the dependency check. Previously, it
was done at execution time, which caused dependency check to happen multiple
time on messages on activty processing nodes instead of actualy executing
activities. Now, the extra work is done on the distributing node which has
"nothing else" to do.
This implementation has been measured as much more efficient in cases like
reindexing a complete site, but Your Mileage May Vary depending on how
activities are created.
Sometimes, when activities fail and are being waited for the result looks like
complete activity freeze. This _is_ a feature.
What you might encounter though is a distribution inneficiency when there are
many activities waiting on others. In pathologic cases, distributing node can
takes tens of seconds to find an electible activity, distribute it, and
searches for the next to distrbute... Sadly, I see no easy way out of this.
One possibility is to control activity generation to avoid creating too many
activities at once, by creating an activity bundle when the previous one is
finished processing (or the number of remaining activities drops below a
certain amount to avoid activity engine starvation... hint: countMessage).
--
Vincent Pelletier
More information about the Erp5-dev
mailing list