Hi @Mir Majeed,
Thank you for contacting Microsoft Q&A. You're facing repeated "lease expired" errors in SQL Server Always On AG, where the primary misses its 20-second WSFC renewal—likely from daily Trellix scan spikes (CPU/I/O overload). Here's a cause breakdown and fixes per Microsoft docs.
- Resource Strain: High CPU (>90%), disk latency (>5-10 ms), low memory (paging)—e.g., from scans locking files.
- Comms Issues: RPC/shared memory failures or quorum loss.
- OS Interference: Hangs, VM throttling, or AV scanning cluster paths (e.g., C:\Windows\Cluster).
I have some solutions you can try:
- Share last 2–3 event timestamps (from AG Dashboard/Event Viewer: Microsoft > FailoverClustering > Operational).
- Confirm Trellix scan times + modules.
- Add AV exclusions: Data/log/TempDB, backups, ERRORLOG/.xel/.trc, Full-Text/Filestream/replication, C:\Windows\Cluster, CSV roots. Processes: sqlservr.exe, sqlagent.exe, fdhost.exe, fdlauncher.exe, Launchpad.exe (if ML), SQLBrowser.exe, clussvc.exe.
- Shift full scans to off-peak; enable throttling/scan-on-write for DBs. See Trellix KB: https://kcm.trellix.com/corporate/index?page=content&id=KB67211.
- If events persist pre-fix: Extend lease timeout via Failover Cluster Manager (Roles > AG resource > Properties > LeaseTimeout=60000 ms > Apply > Offline/Online). Or PowerShell:
Get-ClusterResource "[AG_Name]" | Set-ClusterParameter -Name LeaseTimeout -Value 60000. Revert to 20000 after 2 stable scans. Monitor: SSMS > Always On > Right-click AG > Dashboard.
Here are some referencs I find in Microsoft Office:
- AG basics: What is an Always On availability group?
- Lease timeout: Lease timeout
- SQL AV exclusions: Configure antivirus software to work with SQL Server
- Cluster AV: Antivirus software that isn't cluster-aware may cause problems with Cluster Services
I hope this helps you get things back on track quickly! If you agree with our suggestion, feel free to interact with the system accordingly!