Stranger6667 / postmarker

Python client library for Postmark API
https://postmarker.readthedocs.io/en/stable/
MIT License
134 stars 29 forks source link

Issue with `send_batch()`: LoopExit: This operation would block forever #144

Open ibnIrshad opened 7 years ago

ibnIrshad commented 7 years ago

I get this stack trace periodically when using the send_batch() method on a cherrypy server with a large number of recipients (over 100):

See full stack trace here: https://sentry.io/share/issue/36363330332e323735383136313838/

ibnIrshad commented 7 years ago

Any idea what might be happening here?

Stranger6667 commented 7 years ago

Hi @ibnIrshad ! Sorry for the late response. In fact, I don't have much experience with gevent, but it should be related to requests and gevent combination. Probably guys fromgevent could give a better explanation what happened here. From my side the situation is - postmarker uses requests under the hood and in some cases it does more than 1 request to Postmark API - e.g. if the number of recipients > 500 it is split to multiple batches by 500 recipients in each one. I don't know if it is your case, but I hope, that it could help :)

Best Regards