Can't figure out what this error means (rails Net::OpenTimeout: execution expired)

折月煮酒 提交于 2019-12-04 19:45:21
Paritosh Piplewar

Can't figure out what this error means Net::OpenTimeout: execution expired

It is simply a timeout error. It occurs when the third party server take time to respond.

Solution

  1. First move method in the background job.
  2. add some delay in making next request. The delay depends on how much capable or limit you have to make a call in per sec to the third party server. sleep 5 is works in most of the case.
  3. If possible, make a batch request.

References

  1. What are the limits on outbound calls and SMS messages per-second?
  2. Using Twilio SMS API, can I specify multiple destination phones in one post?
  3. How to send bulk SMS with twilio API

There is no response received from SMS service url. Processing of request failed due to no response and waiting time for request has been exceeded. connectivity issue with service, so you experienced timeout

I have used this SMS service in my API to send messages on mobile phones, have experienced this error before. This is the connectivity issue with server. Application is sending request to the service url and it has waited for certain amount of time, when no response is received and waiting time has exceeded, the request execution was halted due to time out and rails gave this error.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!