Aias00 opened a new issue, #6667:
URL: https://github.com/apache/shenyu/issues/6667

   - severity: High
   - files: 
`shenyu-common/src/main/java/org/apache/shenyu/common/config/ShenyuConfig.java:1669`
 (`private Integer maximumPoolSize = Integer.MAX_VALUE;`); wiring 
`shenyu-web/src/main/java/org/apache/shenyu/web/configuration/ShenyuThreadPoolConfiguration.java:104-107`
 (core=200, max=Integer.MAX_VALUE, `MemorySafeTaskQueue(256MB)`, 
`AbortPolicy`); `TaskQueue.java:57-58` (`offer` returns `false` while 
`currentPoolThreadSize < maximumPoolSize`)
   - description: The "eager" `TaskQueue` returns `false` whenever 
`currentPoolThreadSize < maximumPoolSize`, forcing `ThreadPoolExecutor` to 
spawn a new worker instead of queueing. With `max=Integer.MAX_VALUE` a 
sustained burst spawns threads without bound (each ~1 MB stack) *before* the 
memory-bounded queue is ever consulted. `AbortPolicy` is effectively 
unreachable. This pool backs all plugin/async work on the gateway.
   - impact: Thread explosion / OOM under burst on the core gateway pool; 
`corePoolSize=200` is already a high idle footprint.
   - suggested_fix: Default `maximumPoolSize` to a bounded, configurable value 
(e.g. `4 * availableProcessors` or a documented cap).
   - confidence: High
   
   ---
   _Identified during the 2026-08-02 deep re-scan; full list in 
[`docs/scan2-2026-08-02/00-consolidated-critical-high.md`](docs/scan2-2026-08-02/00-consolidated-critical-high.md)._


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to