There are a few things I see potentially going wrong... Firstly your session might be dying off and killing all your shit, which you can test by following a few steps:
- Set up bot to do some action (cavebot, or just walking between 2 points on the map
- Put another character there, and watch the bot doing its thing
- Kill your connection to the VPS
If your char stops walking when your connection to the VPS dies, then the way you are killing your session is also killing all processes running within it. The way to fix this is to find a way to keep that session open and only terminate your connection to it (currently you'd be killing the session as well as your connection to it).
Other than that, it might be that some power saving measures implemented by the data centre are kicking in and perhaps dropping your network or even other resources for some unknown reason. I'd advise checking to see what's actually running on the server, as well as scanning the control panel to see if you can find any sort of power settings etc. It's very unlikely but depending on how good your host is, it could happen.
Finally, it could just be server kicks. I've only been online for an hour in the last few days, and I had a few kicks in that time. Wouldn't surprise me if that's what you're hitting.