我有一个基于ruby-graphql的应用程序,它具有内置的聊天功能。我尝试过各种配置组合,但始终遇到问题。建立Websocket连接后,应用服务器会偶尔停止响应。在刷新客户端计算机上的页面后,服务器将再次开始响应。
我尝试过的事情-
在我的网络应用中运行动作电缆。
将动作电缆作为单独的机架应用程序运行。
分别使用puma和phusion-passenger尝试1和2。
将运行该应用程序的硬件最多升级8次。
我正在考虑的事情-
为websocket使用不同的服务器。
在该单独的服务器上试用anycable / anycable-go。
应用服务器记录日志,冻结时只说
himanshu821@hornet:/var/deploy/educatly_staging/web_head/current/log$ tail -f staging.log
I, [2018-12-20T12:25:05.873327 #9916] INFO -- : [ActionCable] [User 6] ConversationsChannel is streaming from conversations:16
I, [2018-12-20T12:25:05.871591 #9916] INFO -- : [ActionCable] [User 6] ConversationsChannel is streaming from conversations:4
I, [2018-12-20T12:25:05.871648 #9916] INFO -- : [ActionCable] [User 6] ConversationsChannel is streaming from conversations:14
I, [2018-12-20T12:25:05.871698 #9916] INFO -- : [ActionCable] [User 6] ConversationsChannel is streaming from conversations:40
I, [2018-12-20T12:25:05.871744 #9916] INFO -- : [ActionCable] [User 6] ConversationsChannel is streaming from conversations:44
I, [2018-12-20T12:25:05.871789 #9916] INFO -- : [ActionCable] [User 6] ConversationsChannel is streaming from conversations:15
I, [2018-12-20T12:25:05.871897 #9916] INFO -- : [ActionCable] [User 6] ConversationsChannel is streaming from conversations:18
I, [2018-12-20T12:25:05.871946 #9916] INFO -- : [ActionCable] [User 6] ConversationsChannel is streaming from conversations:20
I, [2018-12-20T12:25:05.871992 #9916] INFO -- : [ActionCable] [User 6] ConversationsChannel is streaming from conversations:23
I, [2018-12-20T12:25:05.872107 #9916] INFO -- : [ActionCable] [User 6] ConversationsChannel is streaming from conversations:21
我已经用htop在这种状态下分析了服务器,它使用了大约10-20%的硬件。
以前有人遇到过这种问题吗?如果是,我是否朝着正确的方向前进,否则可能会出现完全不同的问题?