🚨 [Major Fixes & System Overhaul โ May 27 Update]
Posted: Thu May 29, 2025 6:26 pm
Big under-the-hood changes to make the server faster, safer, and more stable. 
---
Scheduled Task Management
Tasks now have static references for proper tracking & cancellation,
Prevented duplicate tasks from running at the same time,
Shutdown-aware: Tasks now respect a shutdown flag,
Proper Shutdown Sequence
closeServices() now has a timeout + forced shutdown fallback,
isShuttingDown flag prevents late-executing tasks,
Clean & orderly service shutdown guaranteed,
Robust Error Handling
Each task wrapped in its own try-catch โ no more one-failure crashes all!,
Improved logging to capture issues fast,
Player data saving now safe & doesn't break shutdown,
Enhanced Memory Cleanup
Memory usage now monitored before/after GC,
Multiple GC cycles triggered only under high memory pressure,
Safer cache clearing with null checks & timed purging,
Graceful Executor Shutdown
Executors await proper termination with timeout fallback,
Handles interrupt signals to prevent hangs,
Extra Improvements
More logs for better debugging,
Tracks success/failure of player & system data saves,
Safer background thread interruptions,
Clearer service start/stop flags to avoid race conditions,
MAJOR Memory Leak Fixes
Tasks tracked via Future<?> for easier cancellation,
Tasks check isShuttingDown before running,
Forced memory cleanup only under pressure,
Performance Upgrades
Smarter memory reporting:
---