Timeouts on heroku
Hey,
I was able to launch my app but I notice its reallly slow right now. Looking at the logs I see:
2012-01-20T02:10:47+00:00 heroku[router]: Error H12 (Request timeout) -> POST morning-dawn-8986.herokuapp.com/autoprovision/58 dyno=web.1 queue= wait= service=30000ms status=503 bytes=0
2012-01-20T02:10:47+00:00 heroku[router]: Error H12 (Request timeout) -> POST morning-dawn-8986.herokuapp.com/autoprovision/57 dyno=web.1 queue= wait= service=30000ms status=503 bytes=0
2012-01-20T02:10:48+00:00 heroku[router]: Error H12 (Request timeout) -> POST morning-dawn-8986.herokuapp.com/autoprovision/59 dyno=web.1 queue= wait= service=30000ms status=503 bytes=0
What are these requests ment to be doing, and should they be timing out (and slowing things down) like this?
Strange. Those are the POST requests being made by Twilio to your app. They shouldn't be timing out. This could be any number of things, from heroku slowness (are you using a free instance? Perhaps they have some sort of throttling? I haven't played with Heroku at all yet). Can you tell me more about your setup/code?
On Thu, Jan 19, 2012 at 6:11 PM, Eric Koslow < [email protected]
wrote:
Hey,
I was able to launch my app but I notice its reallly slow right now. Looking at the logs I see:
2012-01-20T02:10:47+00:00 heroku[router]: Error H12 (Request timeout) -> POST morning-dawn-8986.herokuapp.com/autoprovision/58 dyno=web.1 queue= wait= service=30000ms status=503 bytes=0 2012-01-20T02:10:47+00:00 heroku[router]: Error H12 (Request timeout) -> POST morning-dawn-8986.herokuapp.com/autoprovision/57 dyno=web.1 queue= wait= service=30000ms status=503 bytes=0 2012-01-20T02:10:48+00:00 heroku[router]: Error H12 (Request timeout) -> POST morning-dawn-8986.herokuapp.com/autoprovision/59 dyno=web.1 queue= wait= service=30000ms status=503 bytes=0What are these requests ment to be doing, and should they be timing out (and slowing things down) like this?
Reply to this email directly or view it on GitHub: https://github.com/sjwalter/node-twilio/issues/20
Heres my code.
https://gist.github.com/78bd07d702a90b3c8d92
Instead of the
app.post('/twilio', function(req, res) {
// Do stuff here
});
I had
phone.setup(function() {
phone.on('incommingSms', function(req, res) {
//Do Stuff here
});
});
But I removed it to try and get rid of my problem (it didn't work).
I'm having a similar problem using a private VPS (not heroku).
With the following code, I'm getting working phone calls but when they terminate, Twilio generates an error (An attempt to retrieve TwiML from http://...:31337/autoprovision/3 failed; the connection timed out)
var ...
, TwilioClient = require('twilio').Client
, Twiml = require('twilio').Twiml
, client = new TwilioClient(config.twilio.sid,
config.twilio.token, config.twilio.hostname)
//...
call: function(number, msg) {
var phone = client.getPhoneNumber(config.twilio.outgoing);
phone.setup(function() {
console.log('Making twilio call to', number);
phone.makeCall(number, null, function(call) {
call.on('answered', function(reqParams, res) {
res.append(new Twiml.Say(msg, {
voice: 'woman',
loop: 4,
}));
res.send();
console.log('called', number, 'reqparams: ', reqParams);
});
});
});
},
This library is deprecated in favor of the official library - https://github.com/twilio/twilio-node