[Feature] 为什么网站跟emqx进行webscoket连接,每隔1分钟就会掉线重连 #9385
Unanswered
AlexQiulin
asked this question in
Q&A
Replies: 1 comment
-
以下是我网站前端的代码 const client = mqtt.connect('ws://ip:8083/mqtt', { 当我把keepalive设置为30 或者更低 时也会出现掉线的问题 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
1Panel Version
2.02
Please describe your needs or suggestions for improvements
我在1panel中建立的网站跟在1panel中建立的emqx5.10进行webscoket连接时,每隔1分钟都会掉线一次,以下方式我都尝试过了,都没有得到解决。
1:修改nginx配置 proxy_read_timeout 3600s; proxy_send_timeout 3600s;
2:把emqx的网络切换为host (绕开了NAT)
3:尝试使用了ssl
4:挂载了本地的时区/etc/localtime ( OpenResty emqx 本地电脑 时区都保持着一致)
很奇怪的是,我在宝塔上进行这样同样的设置,宝塔搭建的网站和宝塔docker中的emqx进行连接不会出现每分钟掉线的情况,并且我用1panel上的网站去连接宝塔上部署的emqx也不会出现每分钟掉线的情况。
请各位大神帮忙指点一下
Please describe the solution you suggest
No response
Additional Information
No response
Beta Was this translation helpful? Give feedback.
All reactions