When restarting the Ambience Server, it is important to ensure that Java processes are properly cleaned up. If not, lingering Java processes may remain in the background, consuming system resources and causing the server to become unresponsive over time.
Recommended Restart Procedure:
-
Stop the Ambience Server using your service control or shutdown script.
-
Monitor running Java processes to ensure they have fully terminated.
- On Windows: open Task Manager and check for any
java.exeorjavaw.exeprocesses. - On Linux/Unix: run
ps -ef | grep javato list active Java processes.
- If any Ambience/Repertoire related Java processes are still running, manually kill them:
- On Windows: select the process in Task Manager and click End Task.
- On Linux/Unix: use
kill -9 <PID>where<PID>is the process ID.
- Start the Ambience/Repertoire Server service again only after confirming that all previous processes have ended.
Why This Is Important
- Prevents memory leaks and high CPU usage caused by orphaned Java processes.
- Ensures a clean startup of the Ambience/Repertoire Server.
- Reduces risk of server slowness or unresponsiveness.
Best Practice
- Always perform a full stop and verify that all Java processes are cleared before starting the Ambience Server again. This helps maintain system stability and improves performance.
- Do not directly use the Restart option in Windows Services, as this may leave orphaned Java processes running.
To create a batch script to automate the restarting of Ambience 4.x, kindly follow the guide in this support entry:
Automatically Restart Ambience Service and Terminate Java Processes Using a Batch Script - Ambience 2020+ - Elixir Support Forum