<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>On Wed, 31 Jul 2019, at 2:11 AM, Maxim Dounin wrote:<br></div><blockquote type="cite" id="qt"><div>> I think I see the problem - when using SMTP with SSL and resolver, <br></div><div>> read events might be enabled during address resolving, leading to <br></div><div>> duplicate ngx_mail_ssl_handshake_handler() calls if something <br></div><div>> arrives from the client, and duplicate session initialization - <br></div><div>> including starting another resolving.<br></div></blockquote><div><br></div><div>That neatly explains why the problem became more noticeable as number of connections went up. With the load a little higher, DNS resolution could conceivable take a little longer, making it more likely that the bug would be triggered.<br></div><div><br></div><blockquote type="cite" id="qt"><div>> The following patch should resolve this:<br></div></blockquote><div><br></div><div>I've been running the second patch you posted for ~22hrs with no crashes, compared to one every 10-20mins previously. So I think you got it! Thank you so much!<br></div><div><br></div><div>Cheers,<br></div><div>Rob N.<br></div></body></html>