Skip to content

perf: enhance monitor stability with non-blocking LOCK acquisition (#1754)#1773

Open
zhu6201976 wants to merge 1 commit intounclecode:developfrom
zhu6201976:verify-fix/1754-stability
Open

perf: enhance monitor stability with non-blocking LOCK acquisition (#1754)#1773
zhu6201976 wants to merge 1 commit intounclecode:developfrom
zhu6201976:verify-fix/1754-stability

Conversation

@zhu6201976
Copy link

Summary:
While the recent changes in develop introduce a global wait_for timeout for update_timeline, the monitor still attempts to "queue" for the global LOCK. Under extreme load, this can lead to unnecessary resource contention.

Improvements:

Non-blocking Stats: Changed LOCK acquisition within monitor.py to a fail-fast mechanism (0.5s timeout). If the crawler pool is busy, the monitor skips the current data point instead of adding to the lock queue.

System Resilience: Ensures that telemetry collection never interferes with the core mission-critical path (browser lifecycle management).

Error Silencing: Downgraded lock-timeout warnings to debug logs to avoid cluttering production logs during expected high-load spikes.

Why this matters:
In high-concurrency enterprise environments, skipping a single monitoring heartbeat is preferable to adding latency to the asyncio event loop.

@ntohidi ntohidi changed the base branch from main to develop February 25, 2026 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant