Error message
[HSF-Provider] HSF thread pool is full.
What this error means
The High-speed Service Framework (HSF) provider's thread pool has reached its maximum capacity. Incoming requests from consumers are rejected because no threads are available to process them.
Possible causes
Slow service processing -- Provider-side business logic takes too long to complete (for example, slow database queries, blocking HTTP calls to external services, or lock contention), which prevents threads from being released in time.
High request volume -- The consumer-side request rate exceeds the provider's processing capacity, exhausting all available threads.
Diagnose the issue
By default, HSF automatically dumps thread stack information to the following file when the thread pool is full:
/home/admin/logs/hsf/HSF_JStack.logOpen this file and look for threads named HSFBizProcessor-xxx. Examine the thread stack traces to identify the performance bottleneck.
Resolve the issue
Optimize service performance
Address the root cause identified in the diagnostic step:
Slow external calls -- Add timeouts to database queries, HTTP clients, and remote service calls to prevent threads from blocking indefinitely.
Lock contention -- Reduce the scope of synchronized blocks, or switch to concurrent data structures.
CPU-intensive operations -- Optimize algorithms, add caching, or offload heavy computation to asynchronous tasks.
Adjust thread pool size
If the default thread pool is too small for your workload, increase it by using Java Virtual Machine (JVM) parameters:
| JVM parameter | Description | Default |
|---|---|---|
-Dhsf.server.min.poolsize | Minimum number of threads in the HSF thread pool | 50 |
-Dhsf.server.max.poolsize | Maximum number of threads in the HSF thread pool | 720 |
For example, to set the maximum pool size to 1024:
-Dhsf.server.max.poolsize=1024Increasing the thread pool size treats the symptom, not the root cause. If threads are blocked on slow downstream calls, adding more threads delays the problem but does not solve it. Always investigate and resolve the underlying performance bottleneck first.
Scale out the provider
If the request volume exceeds what a single instance can handle, add more provider instances to distribute the load.