So I did upgrade my programs since I was running an older version of twilio; now I'm using the latest built.
Still getting the error on occasions though. I'm using my pythonanywhere app as a twilio webhook and I can set in twilio another webhook when primary handler fails which I redirect to the same pythonanywhere app.
The problem doesn't seem to be in my program because when twilio fails to retrieve content on first try, it usually succeeds on second try via the secondary webhook. There are no errors in my logs, only thing I noticed is in the access log :
[04/Nov/2017:04:27:51] "POST / HTTP/1.1" 200 50 "-" "TwilioProxy/1.1" "34.207.124.84" response-time=0.390
[04/Nov/2017:04:28:00] "POST / HTTP/1.1" 200 50 "-" "TwilioProxy/1.1" "54.210.32.202" response-time=0.425
[04/Nov/2017:04:28:17] "POST / HTTP/1.1" 200 50 "-" "TwilioProxy/1.1" "54.209.65.101" response-time=0.474
[04/Nov/2017:11:35:39 "POST / HTTP/1.1" 200 50 "-" "TwilioProxy/1.1" "54.242.73.127" response-time=1.595
[05/Nov/2017:00:06:32] "POST / HTTP/1.1" 503 5 "-" "TwilioProxy/1.1" "34.229.219.100" response-time=4.869
[05/Nov/2017:00:06:35] "POST / HTTP/1.1" 200 50 "-" "TwilioProxy/1.1" "54.210.32.202" response-time=2.363
[06/Nov/2017:03:22:36] "POST / HTTP/1.1" 200 50 "-" "TwilioProxy/1.1" "34.207.124.84" response-time=1.726
[06/Nov/2017:03:22:46] "POST / HTTP/1.1" 200 50 "-" "TwilioProxy/1.1" "54.227.125.220" response-time=0.351
[09/Nov/2017:13:55:50] "POST / HTTP/1.1" 200 50 "-" "TwilioProxy/1.1" "52.90.170.52" response-time=0.597
[09/Nov/2017:13:56:04] "POST / HTTP/1.1" 200 50 "-" "TwilioProxy/1.1" "54.174.2.223" response-time=0.635
[09/Nov/2017:13:56:28] "POST / HTTP/1.1" 200 50 "-" "TwilioProxy/1.1" "34.229.95.231" response-time=0.688
[10/Nov/2017:01:09:00] "POST / HTTP/1.1" 503 5 "-" "TwilioProxy/1.1" "52.54.134.254" response-time=4.866
[10/Nov/2017:01:09:01] "POST / HTTP/1.1" 200 50 "-" "TwilioProxy/1.1" "54.173.40.131" response-time=0.931
The only time I hit the 503 error it seems I'm having a longer response time ( > 4 sec). It it still weird because in Twilio's doc, they state that they wait for a maximum of 15 seconds which I'm nowhere near :
An 11200 error is an indicator of a connection failure between Twilio
and your service. When Twilio requests a page from your server, we
wait a maximum of 15 seconds for a response. A connection failure will
occur if no response is returned in that time.