Is it a good practice to restart VPS server everyday?

I am building an app server using Ubuntu 20.04 and will be serving thousands of clients with potentially a million http messages everyday.
I wanted to ask if it is a good practice to restart my server everyday at midnight?
I think this will help release any memory issues, clear cache, etc. and make my server operate fast everyday.
I am getting this idea from using my laptop, performs really bad if I dont restart once a week.

Side question: How would one code this in Kotlin or Python (to restart the VPS and then launch my server .jar file after the restart)?

Asked By: Cool_Coder


No. This is a very bad practice.

As @raj states, a properly configured server running properly coded software should never have to be restarted, unless needed because of security updates.

So build your app without memory leaks, and you should be good.

Answered By: Artur Meinild
Categories: Answers Tags: , , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.