logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Proxy_Pass Max connections to Tomcat
Author
spdaman



Joined: 16 Nov 2018
Posts: 2
Location: US,Orlando

PostPosted: Fri 16 Nov '18 22:57    Post subject: Proxy_Pass Max connections to Tomcat Reply with quote

Hi all,

I need to understand how many threads or max connections will be forwarded from an apache web server to Tomcat server using Proxy_pass AJP.

This is my current configuration

<IfModule event.c>
ServerLimit 25
ThreadLimit 100
StartServers 5
MaxRequestWorkers 2500
MinSpareThreads 75
MaxSpareThreads 5000
ThreadsPerChild 100
MaxConnectionsPerChild 0

ProxyPass / ajp://tomcat01:8009/
ProxyPassReverse / ajp://tomcat01:8009/

The apache documentation states that the maximun number of allowed connections to the backend (tomcat) when using MPM (Event in my case) is controlled by the ThreadsPerChild directive. So the question is will 100 connections be allowed or ThreadsPerChild x ServerLimit = 2500 ??

Please let me know how that works.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 21 Nov '18 18:47    Post subject: Reply with quote

Yepp that is true, how ever effictive you will be able to have some more connections since event empm can reuse the connections and for a exmaple downloading a css files doesn't take long and than the connection is free again. Also KeepAlive with event mpm does a lot. If you have a "newer" apache and can use mod_h2 for http/2 a single browser opens only a single connection and reuses it.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 21 Nov '18 18:49    Post subject: Reply with quote

Yes your calculation is correct. See also https://httpd.apache.org/docs/2.4/en/mod/event.html
Back to top
spdaman



Joined: 16 Nov 2018
Posts: 2
Location: US,Orlando

PostPosted: Wed 05 Dec '18 23:43    Post subject: Reply with quote

You mention calculation is correct but don't specify which how many will get forward 100 or 2500?

Let me know.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Mon 10 Dec '18 12:04    Post subject: Reply with quote

MaxRequestWorkers 2500
Back to top


Reply to topic   Topic: Proxy_Pass Max connections to Tomcat View previous topic :: View next topic
Post new topic   Forum Index -> Apache