游戏专用服务器应用程序在 Ubuntu 18.04 上运行一段时间后崩溃/延迟 - xfce4 GUI

游戏专用服务器应用程序在 Ubuntu 18.04 上运行一段时间后崩溃/延迟 - xfce4 GUI

我一直在运行一个游戏服务器应用程序,一段时间后,所有连接到它的人都崩溃了(数据包延迟一/两分钟,导致大多数人断开连接,但应用程序保持打开状态,随后恢复与新人的连接)。

服务器运行在一台 VPS 上,配有一个 vCore、2 GB RAM 和 100 mbps 网络带宽。我监控了资源,当游戏服务器已满时,CPU 的工作效率约为 60%,而 RAM 始终约为 30%。上传消耗约 10 mbps。防火墙已禁用。

我说的是 Assetto Corsa 专用服务器。

NOFILE ulimit 设置为一个大值。

我应该按照这个帖子的解决方案吗,或者它对这个问题没用?

如何增加 UDP 接收缓冲区大小?

最后,我看到其他人在 Ubuntu 16.04 上运行此应用程序。18.04 版会导致这些问题吗?

我也更换了提供商,结果是服务器在 2 天后崩溃,而使用之前的提供商则在 1 天后崩溃。

这是崩溃时的日志。

2021-05-20 20:42:34,760: PAGE: /cq/kehulistajax.php
2021-05-20 20:42:35,131: PAGE: /INFO
2021-05-20 20:42:35,132: REQ
2021-05-20 20:42:35,331: PAGE: /check.php
2021-05-20 20:42:35,608: PAGE: /api/wallet/redDetail
2021-05-20 20:42:35,632: PAGE: /INFO
2021-05-20 20:42:35,632: REQ
2021-05-20 20:42:35,655: PAGE: /JSON|765xxx
2021-05-20 20:42:35,734: EOF
2021-05-20 20:42:35,891: PAGE: /h5/
2021-05-20 20:42:35,939: PAGE: /INFO
2021-05-20 20:42:35,939: REQ
2021-05-20 20:42:35,983: PAGE: /INFO
2021-05-20 20:42:35,983: REQ
2021-05-20 20:42:36,094: PAGE: /JSON|765xxx
2021-05-20 20:42:36,175: PAGE: /index.php/Wap/Api/getBanner
2021-05-20 20:42:36,269: PAGE: /INFO
2021-05-20 20:42:36,269: REQ
2021-05-20 20:42:36,450: PAGE: /index.php/Wap/Api/getSystemNotice
2021-05-20 20:42:36,830: PAGE: /JSON|765xxx
2021-05-20 20:42:37,344: PAGE: /JSON|765xxx
2021-05-20 20:42:37,617: PAGE: /script/public.js
2021-05-20 20:42:37,775: EOF
2021-05-20 20:42:38,157: PAGE: /INFO
2021-05-20 20:42:38,157: REQ
2021-05-20 20:42:38,559: PAGE: /JSON|765xxx
2021-05-20 20:42:40,130: PAGE: /api/site/getInfo.do
2021-05-20 20:42:40,214: New connection from &{{14664763300}}
2021-05-20 20:42:40,214: SOCKET NO DELAY SET
2021-05-20 20:42:40,215: PAGE: /locale/Goex/zh/common.js
2021-05-20 20:42:40,219: PAGE: /JS/loginstatus.js
2021-05-20 20:42:40,465: PAGE: /base/goexjs
2021-05-20 20:42:40,622: PAGE: /JSON|765xxx
2021-05-20 20:42:40,834: PAGE: /JSON|765xxx
2021-05-20 20:42:40,918: EOF
2021-05-20 20:42:41,171: PAGE: /INFO
2021-05-20 20:42:41,171: REQ
2021-05-20 20:42:41,178: PAGE: /INFO
2021-05-20 20:42:41,178: REQ
2021-05-20 20:42:41,359: PAGE: /other/codepay/js/codepay_util.js
2021-05-20 20:42:41,429: PAGE: /anquan/qgga.asp
2021-05-20 20:42:41,679: PAGE: /statics/js/API.js
2021-05-20 20:42:41,796: PAGE: /INFO
2021-05-20 20:42:41,797: REQ
2021-05-20 20:42:41,930: PAGE: /common/download.js
2021-05-20 20:42:42,712: PAGE: /JSON|765xxx
2021-05-20 20:42:43,977: PAGE: /JSON|765xxx
2021-05-20 20:42:43,988: PAGE: /JSON|765xxx
2021-05-20 20:42:44,353: PAGE: /JSON|765xxx
2021-05-20 20:42:44,857: PAGE: /JSON|765xxx
2021-05-20 20:42:44,868: PAGE: /INFO
2021-05-20 20:42:44,868: REQ
2021-05-20 20:42:44,970: PAGE: /JSON|765xxx
2021-05-20 20:42:45,186: PAGE: /config
2021-05-20 20:42:45,376: PAGE: /INFO
2021-05-20 20:42:45,376: REQ
2021-05-20 20:42:45,822: PAGE: /user/login
2021-05-20 20:42:46,100: PAGE: /zz2/address.php
2021-05-20 20:42:46,722: PAGE: /
2021-05-20 20:42:47,831: PAGE: /INFO
2021-05-20 20:42:47,832: REQ
2021-05-20 20:42:48,667: PAGE: /JSON|765xxx
2021-05-20 20:42:48,696: PAGE: /JSON|765xxx
2021-05-20 20:42:51,017: PAGE: /JSON|765xxx
2021-05-20 20:42:51,191: PAGE: /INFO
2021-05-20 20:42:51,192: REQ
2021-05-20 20:42:51,438: PAGE: /JSON|765xxx
2021-05-20 20:42:51,641: PAGE: /style.css
2021-05-20 20:42:51,994: PAGE: /JSON|765xxx
2021-05-20 20:42:51,994: PAGE: /js/json.js
2021-05-20 20:42:52,096: PAGE: /api/currency/quotation_new
2021-05-20 20:42:52,174: PAGE: /INFO
2021-05-20 20:42:52,174: REQ
2021-05-20 20:42:52,178: PAGE: /INFO
2021-05-20 20:42:52,178: REQ
2021-05-20 20:42:52,241: PAGE: /Content/css/wzwstylel.css
2021-05-20 20:42:52,279: EOF
2021-05-20 20:42:52,562: PAGE: /JSON|765xxx
- - - - - - -  other example of crash logs - - - - - - - -
2021-05-10 14:47:38,480: PAGE: /JSON|765xxx
2021-05-10 14:47:38,657: PAGE: /JSON|765xxx
2021-05-10 14:47:38,827: ERROR on SendTCPPacket: write tcp ipxxx:9722->ipxxx:43602: write: connection timed out
2021-05-10 14:47:38,827: ERROR on SendTCPPacket: write tcp ipxxx:9722->ipxxx:56621: write: broken pipe
2021-05-10 14:47:38,827: ERROR on SendTCPPacket: write tcp ipxxx:9722->ipxxx:63440: write: broken pipe

many many more for 1/2 minutes

EDIT: I've seen also a no route to host error added to connection timeout and broken pipe.

我在上面的代码中看到了奇怪的字符串,例如“PAGE:/api/wallet/redDetail”。

它们是什么意思?它们对游戏应用程序来说毫无意义,似乎是对系统的干扰。

在游戏服务器正常运行期间不会看到此类字符串。

我认为这对于理解这个问题是一个很好的提示。

我怎样才能解决这个问题?

编辑:假设游戏过程开始时只使用了几 MB 的 RAM,然后两天后使用量增加到约 90 MB 的 RAM 并打开了许多文件(上次我检查时打开的文件数量已达到约 2000 个)。

相关内容