简体   繁体   English

在使用 nohup 命令启动的 Vultr VPS Ubuntu 64 上设置的 Discord Bot 每隔几个小时就会脱机

[英]Discord Bot set up on Vultr VPS Ubuntu 64 that gets started with nohup command goes offline every few hours

I made a very basic ping pong Discord bot with a few commands.我用一些命令制作了一个非常基本的乒乓 Discord 机器人。

I deployed it on Vultr VPS server.我将它部署在 Vultr VPS 服务器上。 I followed this tutorial: https://www.writebots.com/discord-bot-hosting/我跟着这个教程: https : //www.writebots.com/discord-bot-hosting/

PM2 did not make my bot go online, so that's where I differed from the tutorial. PM2 没有让我的机器人上线,所以这就是我与教程不同的地方。 I kick it off with command:我用命令开始:

nohup node bot.js

It runs fine for hours and then goes offline several hours later.它可以正常运行几个小时,然后在几个小时后离线。 I would really appreciate some help.我真的很感激一些帮助。

我认为您应该简单地创建一个屏幕会话,然后在关闭终端之前将其分离,而不是将 NoHup 与 vps 一起使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM