starting 2020-08-17, we've gotten several failmails per day regarding the recurring queue consumer crashing.
Error: Unsupported operand types in Statistics\Collector\AbstractCollector->endTimer()
(line 347 of vendor/jackgleeson/stats-collector/src/Collector/AbstractCollector.php)
line 347 subtracts the start timer from the end timer to get the diff:
'diff' => $end - $this->getStat($namespace)['start'],
but is wrapped in a check that should ensure the start is set:
if ($this->hasStartTimer($namespace)) {
We haven't been able to replicate it locally, but it seems to happen after processing a subscr_signup message from paypal. The contribution_recur row does not get written to the database, so the payments for these subscriptions will probably end up in the damaged queue.
recent changes that involve the Stats collection include
- https://gerrit.wikimedia.org/r/c/wikimedia/fundraising/crm/+/704214
- https://gerrit.wikimedia.org/r/c/wikimedia/fundraising/crm/+/704215
Looking at recurring_queue_consume-20210818-162001.log, I see a successfully imported subscr_start message with USD currency that created a new contact. The following subscr_start message (which crashed) was in CAD and had a name and email that matched an existing contact.