Question

Scaling my web app to 2 web proceses on Heroku breaks Nowjs/Sockets.io.

I'm using full stack that is new to me and everything works great until I add a 2nd web process. Node.js still responds fine but Nowjs stops responding. I get 503 responds in the browser and

GET musicbacon.com/socket.io/1/?t=1339117661910 dyno=web.2 queue=0 wait=0ms service=2ms status=200 bytes=82
2012-06-08T01:07:42+00:00 heroku[router]: Error H13 (Connection closed without response) -> GET musicbacon.com/socket.io/1/websocket/12401614301555103827 dyno=web.2 queue= wait= service= status=503 bytes=

on the server.

I think that Nowjs (which is an abstraction layer on top of Socket.io) creates it's own server along side my Node.js server. Scaling Heroku spins up a new Node.js server VM but since Now.js isn't yet compatible with distributed environments it just dies.

Hopefully I'm missing something and I can scale Now.js because 1 Heroku web process can only handle about 60 users at a time in my experience.

Full stake is: Heroku Node.js Express Jade Now.js Postgres

Error H13 reference: https://devcenter.heroku.com/articles/error-codes#h13__connection_closed_without_response

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top