We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
問個 Rails5 WebSocket 的問題 小弟公司的聊天室使用了 Rails5 ActionCable 實作,功能是做出來了 但 production 上偶爾(還滿常出現的 冏)會出現錯誤 VM161:37 WebSocket connection to 'ws://amazingtalker.com/cable' failed: Error during WebSocket handshake: Unexpected response code: 404
VM161:37 WebSocket connection to 'ws://amazingtalker.com/cable' failed: Error during WebSocket handshake: Unexpected response code: 404
架構上,server 使用 AWS EC2,流量經 CloudFlare(Https and CDN使用)進來
原先以為是websocket連線數不足導致,但我已經把 nginx config 中的 passenger_force_max_concurrent_requests_per_process 設為 0 了,應該沒有連線數的限制了才對
# nginx config server { listen 80; listen 443 ssl; server_name amazingtalker.com socket.amazingtalker.com; root /home/deploy/Amazingtutor/current/public; location /cable { passenger_app_group_name Amazingtutor_action_cable; passenger_force_max_concurrent_requests_per_process 0; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Proto http; } passenger_enabled on; location ~ ^/assets/ { expires 1y; add_header Cache-Control public; add_header ETag ""; break; } }
不曉得各位有沒有類似的經驗,或指點一下小弟可以如何查案~?! 哪裡可能有問題~?!
The text was updated successfully, but these errors were encountered:
你的網站是全 https 連線,那個 websocket 連線位置應該要是 wss:// 錯誤訊息表示用戶連到 ws://,難怪會 404
Sorry, something went wrong.
謝謝 @ihower~!!
No branches or pull requests
問個 Rails5 WebSocket 的問題
小弟公司的聊天室使用了 Rails5 ActionCable 實作,功能是做出來了
但 production 上偶爾(還滿常出現的 冏)會出現錯誤
VM161:37 WebSocket connection to 'ws://amazingtalker.com/cable' failed: Error during WebSocket handshake: Unexpected response code: 404
架構上,server 使用 AWS EC2,流量經 CloudFlare(Https and CDN使用)進來
原先以為是websocket連線數不足導致,但我已經把 nginx config 中的 passenger_force_max_concurrent_requests_per_process 設為 0 了,應該沒有連線數的限制了才對
不曉得各位有沒有類似的經驗,或指點一下小弟可以如何查案~?! 哪裡可能有問題~?!
The text was updated successfully, but these errors were encountered: