Reputation: 63
I've made a chat room app, I tested locally and it works, but when I deploy it to heroku, there's a CONNECTION REFUSE ERROR, I saw that heroku now support WebSocket, but it seems it's only for all supported technologies but PHP.
Upvotes: 6
Views: 653
Reputation: 660
Yes you can use WebSocket in Heroku. PHP is a very difficult language in general when it comes to WebSockets and I would recommend a different one. But regardless of what I think, you may do as you please. If you are using Heroku, you have to follow the standard rules of idle. If a program reminds idle for 55 seconds the program will be terminated. The way to handle this would be to send a ping message from the server every 30ish seconds.
https://devcenter.heroku.com/articles/websockets
Upvotes: 1