-
Notifications
You must be signed in to change notification settings - Fork 41.1k
Document that Tomcat's maxQueueCapacity need to be greater than 0 #42726
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
type: documentation
A documentation update
Milestone
Comments
map.from(threadProperties::getMaxQueueCapacity)
.when(this::isPositive)
.to((maxQueueCapacity) -> customizeMaxQueueCapacity(factory, maxQueueCapacity)); That's because of this in the Tomcat code: public TaskQueue(int capacity) {
super(capacity);
} which calls public LinkedBlockingQueue(int capacity) {
if (capacity <= 0) throw new IllegalArgumentException();
this.capacity = capacity;
last = head = new Node<E>(null);
} |
I'll add some documentation around that. |
@mhalbritter thanks for quick response but i also tried this with 1 and its still the same. |
There are multiple queues in play here, and it's dependent on the OS. I've written some notes here: #36087 (comment) |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Springboot version - 3.3.4
java - 21
I have used following settings to test tomcat with springboot. i want to check when tomcat rejects the requests.
server.tomcat.accept-count=0
server.tomcat.threads.max=1
server.tomcat.maxConnections=1
server.tomcat.threads.min-spare=1
server.tomcat.threads.maxQueueCapacity=0
I have a controller method where i put a sleep of 5 seconds and i am hitting same endpoint from multiple terminals. Ideally other parallel requests should be rejected with an error but in my case requests are executing sequenclly once previous gets completed.
Could anyone please help what i am doing wrong here ?
The text was updated successfully, but these errors were encountered: