DialAndSend() occasionally not returning...? // Ultimately Dial() #56
Description
So I have this web app that has email campaigns with emails customized to individual recipients...and the average campaign per auction/claim...etc...is 35-50 recipients...I have this throttled at 6 sends per minute.
Sometimes it behaves well...other times I'll catch an email hung in 'sending'...which I set just before DialAndSend()
and set it to 'sent' right after. I added some code on my outer layers of code and the last logging output before that go routine stops responding is the log just before the DialAndSend()
as you can see in the cross-section of a log below. There's a lot of output below that point where the ==> sendMail(): No Error
or ==> sendMail(): Error: '%s'
would normally be...but it continues to hang.
It throws my Emailer service out of tilt because it doesn't respond...I'm getting ready to lay logging code into the source code I pulled so I can find exactly where it's hanging in the source code...but does anyone have any idea what might cause it to hang? Log excerpt below...at the bottom it stops and hangs.
incoming filterBy: comment_subjectguid = UNHEX('37e8015f2f594885b2b1bdf8416319f0')
incoming filterBy: comment_subjectguid = UNHEX('37e8015f2f594885b2b1bdf8416319f0')
===>
===> BEFORE CALL sendMail('76016 (2018 / Freightliner / Cascadia) West Blocton, Alabama')
===> START CALL sendmail('bestautoandusedparts@ymail.com')
m := gomail.NewMessage()
==> sendMail(): m.SetHeader("From", from.Username)
==> sendMail(): m.SetHeader("To", to)
==> sendMail(): m.SetHeader("Subject", subj)
==> BEFORE sendMail(): attachments
==> AFTER sendMail(): attachments
==> sendMail(): m.SetBody("text/html", body)
==> sendMail(): d := gomail.NewDialer(
==> sendMail(): err := d.DialAndSend(m)
incoming filterBy: comment_subjectguid = UNHEX('37e8015f2f594885b2b1bdf8416319f0')
incoming filterBy: comment_subjectguid = UNHEX('37e8015f2f594885b2b1bdf8416319f0')
incoming filterBy: comment_subjectguid = UNHEX('37e8015f2f594885b2b1bdf8416319f0')
==> sendMail(): No Error
===> END CALL sendmail('bestautoandusedparts@ymail.com')
===> AFTER CALL sendMail('76016 (2018 / Freightliner / Cascadia) West Blocton, Alabama')
===>
incoming filterBy: comment_subjectguid = UNHEX('37e8015f2f594885b2b1bdf8416319f0')
incoming filterBy: comment_subjectguid = UNHEX('37e8015f2f594885b2b1bdf8416319f0')
incoming filterBy: comment_subjectguid = UNHEX('37e8015f2f594885b2b1bdf8416319f0')
incoming filterBy: comment_subjectguid = UNHEX('37e8015f2f594885b2b1bdf8416319f0')
incoming filterBy: comment_subjectguid = UNHEX('37e8015f2f594885b2b1bdf8416319f0')
incoming filterBy: comment_subjectguid = UNHEX('37e8015f2f594885b2b1bdf8416319f0')
incoming filterBy: comment_subjectguid = UNHEX('37e8015f2f594885b2b1bdf8416319f0')
incoming filterBy: auction_isopen='YES'
===>
===> BEFORE CALL sendMail('76016 (2018 / Freightliner / Cascadia) West Blocton, Alabama')
===> START CALL sendmail('bdconstruct@airnetisp.com')
m := gomail.NewMessage()
==> sendMail(): m.SetHeader("From", from.Username)
==> sendMail(): m.SetHeader("To", to)
==> sendMail(): m.SetHeader("Subject", subj)
==> BEFORE sendMail(): attachments
==> AFTER sendMail(): attachments
==> sendMail(): m.SetBody("text/html", body)
==> sendMail(): d := gomail.NewDialer(
==> sendMail(): err := d.DialAndSend(m)
incoming filterBy: comment_subjectguid = UNHEX('37e8015f2f594885b2b1bdf8416319f0')
incoming filterBy: comment_subjectguid = UNHEX('37e8015f2f594885b2b1bdf8416319f0')
incoming filterBy: none
incoming filterBy: auction_guid = UNHEX('d45a01b309d54223b238c59caccbdc58')
incoming filterBy: auction_guid=UNHEX('d45a01b309d54223b238c59caccbdc58')
incoming filterBy: payment_guid=UNHEX('38141d2beae046fc8d57f2eb513eb94a')