Page MenuHomePhabricator

Recurring Charge Processor throwing Failed to write to socket: unknown error
Open, LowPublic

Description

This shows up intermittently in the recurring charge job. I think it might be related to the one where we are trying to send a recurring failure notification to a bad email address.

2021-04-29 00:36:21,291 ERROR WD civicrm: $Fatal Error Details = Array [error]
2021-04-29 00:36:21,291 ERROR (
2021-04-29 00:36:21,291 ERROR [callback] => Array
2021-04-29 00:36:21,291 ERROR (
2021-04-29 00:36:21,291 ERROR [0] => CRM_Core_Error
2021-04-29 00:36:21,291 ERROR [1] => exceptionHandler
2021-04-29 00:36:21,292 ERROR )
2021-04-29 00:36:21,292 ERROR
2021-04-29 00:36:21,292 ERROR [code] =>
2021-04-29 00:36:21,292 ERROR [message] => Failed to write to socket: unknown error
2021-04-29 00:36:21,292 ERROR [mode] => 16
2021-04-29 00:36:21,292 ERROR [debug_info] =>
2021-04-29 00:36:21,292 ERROR [type] => PEAR_Error
2021-04-29 00:36:21,292 ERROR [user_info] =>
2021-04-29 00:36:21,292 ERROR [to_string] => [pear_error: message="Failed to write to socket:
2021-04-29 00:36:21,292 ERROR unknown error" code=0 mode=callback
2021-04-29 00:36:21,292 ERROR callback=CRM_Core_Error::exceptionHandler prefix="" info=""]
2021-04-29 00:36:21,292 ERROR )
2021-04-29 00:36:21,292 ERROR

Event Timeline

Missing logs line up with logging change. This is still processing normally but with less info in the logs now.

Hi! Thanks so much for digging in @Cstone! Looking at the code you found... I think Civi::log() should instead be Civi::log('wmf'). That's what we're doing in the new preferences queue consumer. However, grepping through the code, I see a lot of calls to Civi::log() without any parameters. I think Civi does choose a default in that case. So, maybe we want to make sure that logging calls made like that always go to places we see, as well as not erroring out like that?

Thanks again! :)

Cstone renamed this task from Recurring Charge Processor Vague Error Message to Recurring Charge Processor throwing Failed to write to socket: unknown error.Jan 28 2022, 6:59 PM

I've merged the most recent duplicate ticket relating to this. However, there's one log line from the newer ticket, which I think should be captured on its ticket

2022-12-05 08:44:43,569 INFO    civicrm.ERROR: Mailing error: Failed to write to socket: unknown error

This confirms the bug is related to something happening during the mailing process.

greg triaged this task as Low priority.Dec 6 2022, 12:01 AM
greg subscribed.

Low only because of the long delay in reoccurring.

We got another one of these today in recurring_smashpig_charge-20221230-002101.log