I saw that Twilio has a default 15 second timeout for SMS inbound requests. I'm using a Java-based AWS Lambda behind API Gateway for my SMS inbound requests, and it takes a few seconds to spin up a java-based lambda function if it's been dormant for a while. Is it possible to increase my timeout in Twilio?
I've been having issues with Twilio not being able to connect to our server within the 15 second timeout and their support just plainly refuses to increase the timeout. So no, you can't increase it.
You can provide a fallback URL but it is not helping things at all for us.
Something is not right with their setup, they should have built in retries like other service providers.
Related
Greeetings,
I have the following setup
Application Gateway -- Private Endpoints -- App Services
The application gateway is in its own resource group along with the virtual network in the 1.0.0.0 subnet.
The private endpoints and app services have a resource group per resource. So for me that would be 5 Services plus the main group with the AG.
I created all elements via the Portal.
After setting up the backend pool (for starters just for one service) and using the basic settings on all the elements (listeners, rules) I wanted to connect to the gateway public ip or dns name, however all I receive is a timeout, without any hint whatsoever in the monitoring as to what could cause the problem.
The application gateway does not even register a request.
Does anyone know what could be the cause of this? Could the Public IP be faulty for some reason? I even tried disabling the private endpoint on one of the services for debugging purposes but to no avail, seems like that is not the cause.
Any help is appreciated :)
Connection Timeout means that one or more than one server could not
complete your request within some period and does not receive a timely
response from another one that works as a gateway or proxy i.e; did
not complete within alloted time.
Initially try to reload the page in different browser or even on different devices.Clean the site from spam and cookies.
Please check if any of the below possible causes:
(main cause)REQUEST TIMEOUT : The number of seconds that
the application gateway will wait to receive a response from the
backend pool before it returns a “connection timed out” error
message.
When a user request is received, the application gateway applies the
configured rules to the request and routes it to a back-end pool
instance. It waits for a configurable interval of time for a response
from the back-end instance. By default, this interval is 20 seconds.
Solution: Reference >> Try Setting request-timeout :Application Gateway allows you to configure this setting via the
BackendHttpSetting,
Ex:
New-AzApplicationGatewayBackendHttpSettings -Name 'Setting01' -Port 80 -Protocol Http -CookieBasedAffinity Enabled -RequestTimeout 60
Also see App gateway
-troubleshoot-app-service-redirection-app-service-url.
NOTE: If your connections are getting dropped at less than the request
time out seconds set, then we need to find which connection is
trigged. And may need to Contact azure support
In addition to server timeouts, there are other causes
See if it due to default health check probe:like 1) Back-end VMs or
instances of virtual machine scale set are not responding to the
default health probe. 2) Invalid or improper configuration of custom
health probes. 3) Azure Application Gateway's back-end pool is not
configured or empty.
Troubleshoot problems-with-default-health-probe and custom healtH probe : Application gateway automatically configures a
default health probe using properties of the BackendHttpSetting but
Custom health probes allow additional flexibility to the default
probing behavior where you can configure the probe interval, the URL, the path to test, and how many failed responses to accept
before marking the back-end pool instance as unhealthy.
Also check the app service time outs : see appgw-timeouts and app
service time out setting
Other causes to check
Slow server, Problems with the firewall,network connection
If NSG, UDR or Custom DNS blocking access to backend pool members.
If VMs or instances in virtual machine scale set are healthy.
For those : Check the logs and DNS records and try by disabling the proxy or temporarily disabling the CDN
References:
Azure application gateway throws 502 when application sends 401 -
Stack Overflow
Azure Application Gateway error 502 when using application gateway
-Stack Overflow
When I try to access server-sent events endpoint locally it works fine and spits out data every two seconds, when I ssh into the appengine vm it also works fine (using curl) but when I try and access the server-side events endpoint from outside appengine I just get timeouts. Is server-side events blocked in GAE? I see that websocket could be troublesome, but server-side events are over http.
No, server-sent events are not blocked in Google App Engine. But since GAE have buffering enabled by default they will never reach you since the request never completes. Disable buffering with this header in your SSE response:
X-Accel-Buffering: no
Read more here: How Requests are Handled
Does creating a Twilio Capability Token require a request to Twilio's servers?
If I understand correctly, creating a Twilio Capability Token involves some kind of encryption process that happens exclusively on my own server. When I call the library to create one, it is not making a call to Twilio's servers, correct?
If it is purely an encryption process, is it an encryption process that's designed to be "slow". If so, how slow?
I do believe that the creation of the token according to the C# Api, all happens on your own server. The process creates a Json Web Token and that is what is returned from the GenerateToken call. I cannot see anything that would cause the above call to be slow at all.
I know from my server side code, that this process is actually blindingly fast, in our production servers, when a token expires for a Twilio client, it requests a new one from the server and then initialises itself again, this process takes less than 2 seconds to complete and the client is once again able to either make or receive calls, depending on the allowed capabilities.
Perhaps if you share more about what you are experiencing as slow, one would be able to help more?
I hope this helps.
I am currently using the free version of heroku. I have a cedar stack and I am sending up HTTP put request every 2 minutes from a client app to my web app. This will work for about the first few(1-6) request but then heroku blocks my incoming request. I've been looking all over the heroku support and I do not see anything about blocking HTTP put request. The only information I've found is that HTTP request have to be under 200 characters. I was wondering if anyone has had a similar problem. If so, how did you allow your web app to receive frequent HTTP request?
Thanks!
Found my problem. I had a bug in my client code which was using up all my sockets.
On the twitter Rate Limiting page(https://dev.twitter.com/docs/rate-limiting) it says
"Unauthenticated calls are permitted 150 requests per hour. Unauthenticated calls are measured against the public facing IP of the server or device making the request."
Is that the measurement based on enduser IP address or the server IP(ip of http:xxxx.com) ?
Is there a way to increase the limit may be through some paid service of Twitter ?
Regards,
Navin
Server IP
No. But you should use authenticated calls (oAuth) - you get 350 requests per hour. Each authenticated user of your app has 350 calls you can use, IP ignored.