mailjet / mailjet-apiv3-nodejs

[API v3] Official Mailjet API v3 NodeJS wrapper
https://dev.mailjet.com
MIT License
235 stars 69 forks source link

Sporadic 502 Bad Gateway errors #203

Closed cpl-cpi closed 2 years ago

cpl-cpi commented 2 years ago

I send mails with several attachments (in complete ~ 10 MB). Sometimes the API returns successful, but the mail never arrives and sometimes I get an HTTP Error 502 (Bad Gateway). Are there any limitations when using the Mailjet API?

When I reduce the size to about 5MB the Mail is sent successfully. In the Mailjet Docs is written image

Should I open a case at the support?

Thanks

scroll17 commented 2 years ago

Hello @cpl-cpi

Please, see this issue Some attachments failed to be delivered where I explained some cases when you work with email attachments and provide some useful code snippets.

And, yes, I too had some not clearly work with attachments that have sizes more than ~6MB when I test examples in the issue above, and for this reason, I think that you need open a ticket in Support Team

scroll17 commented 2 years ago

If you haven't any additional questions this issue will be closed

cpl-cpi commented 2 years ago

Hmm. I'm not sure. I found out that when I run the code locally, it works. But if I run the same code in GCP in a Cloud Function I get an 502 error....

scroll17 commented 2 years ago

I think that GCP can have some restrictions or limits on which data you send or receive and for this reason, you should open ticket in GCP support team.

cpl-cpi commented 2 years ago

Hmm. There are no other probs on Cloud Functions to address public API. So I don't think that is the problem. But I will try to address this @GCP. Please leave this ticket open until it is clear, that the problem is not on Mailjet side.

Another Error, I got recently was: "Unsuccessful: null socket hang up"

scroll17 commented 2 years ago

Okay, I leave this issue open until solved for this problem.


About the error "Unsuccessful: null socket hang up" - there is an answer for the reason for this error NodeJS - What does "socket hang up" actually mean?


In general, you can contact our Support Team to try to fix this problem with them.

cpl-cpi commented 2 years ago

I've opened a support ticket. I will publish the results here if I get those. Thx for the moment...

scroll17 commented 2 years ago

Hey @cpl-cpi Do you have news?

scroll17 commented 2 years ago

Hey I'm going to close this issue tomorrow, do you have any questions yet?