Postgresql too many locks acquired
critical

Description Too many locks acquired on the database. If this alert happens frequently, we may need to increase the postgres setting max_locks_per_transaction.
Query for 2m
>>>
	
				
					((sum (
				
			
				
					
				
			
				
					)) / (
				
			
				
					
				
			
				
					 * 
				
			
				
					
				
			
				
					)) > 0.20
				
			
    
Query Explanation

The rule computes the ratio of the total number of locks currently held (pg_locks_count) to the maximum possible locks (pg_settings_max_locks_per_transaction * pg_settings_max_connections). If this ratio exceeds 0.20 (i.e., more than 20 % of the available locks are in use), the alert triggers, suggesting that the max_locks_per_transaction setting may need to be increased.

Get Alert
Download
Copy to Clipboard