mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Calculate MAX_WORKERS default value by CPU number (#26177)
To avoid consuming user's 100% CPU, limit the default value of MAX_WORKERS Fix #26063 (the CPU 100% problem mentioned in it)
This commit is contained in:
		@@ -1420,8 +1420,8 @@ LEVEL = Info
 | 
			
		||||
;; Provides the suffix of the default redis/disk unique queue set name - specific queues can be overridden within in their [queue.name] sections.
 | 
			
		||||
;SET_NAME = "_unique"
 | 
			
		||||
;;
 | 
			
		||||
;; Dynamically scale the worker pool to at this many workers
 | 
			
		||||
;MAX_WORKERS = 10
 | 
			
		||||
;; Maximum number of worker go-routines for the queue. Default value is "CpuNum/2" clipped to between 1 and 10.
 | 
			
		||||
;MAX_WORKERS = ; (dynamic)
 | 
			
		||||
 | 
			
		||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 | 
			
		||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user