Any suggetion for server restart

I am looking for days i cant find any,
i am looking script or program do detect memory leak and restart when reach before max ram
or auto restart script

ANYONE?
i am not sure how :frowning:

Are you wanting a script that restarts your actual machine (Dedicated server or VPS)? Or just a script that restarts your FiveM server? Are you running Windows or Linux?

If you’re wanting a script that just auto-restarts your FiveM server, there are several here on the forums. As far as a script restarting your actual machine with memory detection, that probably won’t be found here, and depending on your OS could be easier / harder to implement.

1 Like

well server is running on windows server 2016 vps

i just want just restart the fxserver., some script i find not working as good, can u find me good one that work

I personally run Linux so I can’t say how well these may or may not work; but I found;

I’d be sure to read through the instructions and what not to ensure this does what you are looking for.

If you want something probably easier; you could take a look at this as well;

Though in this one, I’d change “3600” to a greater vaule on how often you’d like to auto restart.

linux is easier to sayy that u can run cornjob and tell it restart it by script .sh

Yep exactly! :grinning:

Script something in Powershell, to detect the memory leak(s), and then create a batch file in Command Prompt to run the PS file, using task scheduler…or just a simple shutdown/restart command in the batch file…not to difficult to Google how to script it in PS or Command Prompt.

That is if your still running it on Windows.

i try few scripts for commands it using vps cpu around 70%, so i decided i install AlwaysUp it have detection of memory feature, what hell trying to get it to work but it working good