Is there a way to use PHP WebSocket in Heroku ?, it seems that by default only support for other technologies is supported there

I made a chat application, I tested it locally and it works, but when I deploy it to heroku, there is a CONNECTION REFUSE ERROR error, I saw that the hero now supports WebSocket, but it seems that this is only for all supported technology but php.

+6
source share
1 answer

Yes, you can use WebSocket in Heroku. PHP is a very complex language in general when it comes to WebSockets, and I would recommend something else. But no matter what I think, you can do as you please. If you use Heroku, you must follow the standard downtime rules. If the program is inactive for 55 seconds, the program will end. A way to handle this would be to send a ping message from the server every 30 seconds.

https://devcenter.heroku.com/articles/websockets

0
source

Source: https://habr.com/ru/post/981997/


All Articles