Closed liveforstudy closed 3 years ago
@liveforstudy if I understand correctly, you are able to schedule tasks and trigger email sends but those are being blocked by the server? I would reach out to support for help.
@liveforstudy,如果我理解正确,那么您可以安排任务并触发电子邮件发送,但是这些被服务器阻止了?我会伸出手来支持寻求帮助。
No, I don't know the specific reason, because I want to develop a regular mailing, normal test is no problem, but when it is sent for about 1-3 days, there will be no response from sendgrid but sendgrid-java sends api method I have been waiting for a response, resulting in a backlog of tasks. I guess that sendgrid-java is sent using httpclient, and the timeout period is extremely long. I have looked for support, and the support staff called me to github feedback
Hello @liveforstudy,
I'm unsure how we can help here with respect to the helper library. Are you asking about adjusting the timeout values?
With best regards,
Elmer
I need a request to get, you can set the timeout, and timeout exception
Hi @liveforstudy, Are you only seeing problems on scheduled emails after 3 continuous days of sending email? Approximately how many emails are you sending a day?
嗨@liveforstudy, 您是否只在连续 3 天发送电子邮件后看到预定电子邮件出现问题?您一天大约发送多少封电子邮件?
The software developed is mass mailing, with a daily delivery volume of about 100,000
If you send too many requests, your SDK request server will appear similar to thread sleep, blocking there. I use my encapsulated httpclient to directly call the API. Now it has been running normally for more than a month;I've been communicating with you. You've always said that it's my problem, so I don't plan to use your encapsulated sendgrid Java. I find that your sendgrid Java is very difficult to use. I suggest you refer to the SDK writing method of OSS similar to Ali,You can integrate spring boot, but let me question your XXXXX
Hello @liveforstudy,
It seems like there are a few issues here:
Please let us know if any of these resources are helpful.
Thank you!
With best regards,
Elmer
Hello @thinkingserious
Not sure if this is the same problem but I just tried to integrate this library to our backend yesterday and all the requests block indefinetly. I've waited for at least 20 minutes for the request to go through but not even exception was thrown. It was just blocking the thread.
val request = Request().apply {
method = Method.POST
endpoint = "mail/send"
body = mail.build()
}
val response = sendGridService.api(request)
Hello @wooodenleg,
Do you want to timeout after a certain amount of time? If so, you can provide a custom client and set your timeout value. If you require non-blocking requests, you may want to look into async http clients and provide one of those as a custom client.
With best regards,
Elmer
Closing due to inactivity. Feel free to open another issue if further help is needed.
Sorry for not responding earlier. I just ended up calling the Sendgrid API on my own.
I didn't want to have a timeout to my request. I wanted to know why doesn't it work and why it just blocks forever. I think there is some bug in this library that causes request to block the thread indefinitely but I didn't investigate it further.
Thanks for your answer anyway and good luck
Issue Summary
Scheduled tasks are sent, about three days or so, sendgrid sends emails will be blocked there, no response is given, and no exceptions are thrown, resulting in a backlog of tasks
Steps to Reproduce
Code Snippet
Technical details: