Vinnie is on the right track here, but there are few details wrong;
If "Save state between runs" is set then all the session data is saved to a state file on close.
This can take time depending o how much there is.
(the file is XML not json).
This is unrelated to graceful close.
Even if the server has only run for a short time there can be a lot of state information, if the state was loaded on startup. So check the size of your state file.
Graceful close completes all active threads before terminating the program. As distinct from a hard close which simply terminates all threads wherever they happen to be.
Bruce