MAX CONNECTIONS for External Apps

ShannonA

Well-Known Member
#1
I'm trying to figure out how these max connections are set


These Max Connections and Eff Max seem totally removed from the "Max Connections" I have set on the individual External Apps. E.g., the forum external app is set to "5", as is the wiki, but those numbered aren't being respected.

So what's going on here, and how does one actually set max connection limits for these various external apps?

Thanks!
 
Last edited:

ShannonA

Well-Known Member
#3
lsws webadmin -> Server -> General -> PHP suEXEC Max Conn
How does that relate to the individual max connections you can set on Virtual Host's External App? In my case the main one is "not set" and the external app has its own number, but the latter is clearly not being followed. (I'd certainly prefer it did, as it *seems* like it should work, and it'd let me control connections per virtual host.)

The resulting behavior is REALLY weird. Like I increase my Max Connections on one of the host's PHP app from 5 to 10 and what's being reported jumps from 20 to 40 ... but in some cases it throws things in the waitQ even when there are connections left in the pool.
 

NiteWave

Administrator
#4
Sorry. "PHP suEXEC Max Conn" is for php suExec mode, which is not your case.

Like I increase my Max Connections on one of the host's PHP app from 5 to 10 and what's being reported jumps from 20 to 40
so your license should be 4-CPU license, 5 x 4 = 20, 10 x 4 = 40.
i.e., max connections = vhost ext app max connection x number of CPU license

however, this doesn't seem to able to explain 15 max connections in the screenshot.
any special for the ext app ?
 

ShannonA

Well-Known Member
#5
so your license should be 4-CPU license, 5 x 4 = 20, 10 x 4 = 40.
i.e., max connections = vhost ext app max connection x number of CPU license
Ah, that explains much. Thanks. That'd be nice info to have in the little tooltip "?".

however, this doesn't seem to able to explain 15 max connections in the screenshot.
any special for the ext app ?
No, it's just set to "5", like most of them. My experience is that they often appear with fewer max connections than you've set (at processors * max) and they climb up in increments of 5 as needed. I've definitely seen them jump like that when my real-time stats was updating.

Any idea about the other weirdness I see from time to time, where there are both external apps in the pool AND In the waitq? (I may just have to wait until [if] I see it again, to grab a screenshot.)
 

NiteWave

Administrator
#6
the 1st line in the screeshot already show this case :)
WaitQ:8 while "Idle:5"
I'm not sure ... usually when WaitQ > 0, Idle = 0.
In theory, since http is a stateless protocol, requests won't queue up if there are idle processes available.

does the WaitQ often last long time?
if it disappears after refresh, or usually only last for short time, it's not that serious.
 

ShannonA

Well-Known Member
#7
does the WaitQ often last long time?
if it disappears after refresh, or usually only last for short time, it's not that serious.
I'll keep an eye on it and see if it sticks around (after I get everything tuned, now that I understand the numbering ...)
 

NiteWave

Administrator
#8
if "Per Client Throttling" is set by
Server -> Security -> Dynamic Requests/second
or
Virtual Hosts-> vhname -> Basic -> Per Client Dyn Reqs/sec

then it may appear:
WaitQ:8 while "Idle:5"

if not set or set to big number, then not this case.
 

ShannonA

Well-Known Member
#9
if "Per Client Throttling" is set by
Server -> Security -> Dynamic Requests/second
or
Virtual Hosts-> vhname -> Basic -> Per Client Dyn Reqs/sec

then it may appear:
WaitQ:8 while "Idle:5"

if not set or set to big number, then not this case.
I just saw some WaitQ again with Idle and so checked these. The Server setting is "0" and the Virtual Host setting is "Not Set".

It also does stick around for a bit. I just watched the waitQ climb up to about 15 and then back down over the course of 15-20 seconds while things set Idle in the Pool.
 

NiteWave

Administrator
#10
I'd say "yes, it's not normal"
Just noticed there is "/" in the external app name( and in virtual host name)
MAYBE it'll cause weird issue like this one.
can you remove "/" from name of virtual host and ext app(or replace it with "_" etc), see if this weird issue will disappear.
 

ShannonA

Well-Known Member
#11
I switched it over for our forums, and I'm still seeing the problem. With a current max of 24, it can rarely get above half of them before dumping stuff in the WaitQ.
 

NiteWave

Administrator
#12
can you paste a screenshot of ext app in a virtual host ? for example:
virtual host->External App->xxx_vb_lsphp
let's see if any special settings in it.
 

ShannonA

Well-Known Member
#13
I've been busy with other things for a couple of months, but this is still an ongoing problem. I just moments ago saw 10 or so idle connections with 10 things in the wait queue. So, hoping you can still help with it.

Here's that look at our External App, requested long ago. As you can see I've also changed our Virtual Host name to get rid of a "/" per an earlier suggestion.


I've got some time scheduled for figuring out this sort of thing this week, so let me know if anything else might be enlightening ...
 

NiteWave

Administrator
#14
looks problem here. please modify and try:
Environment: PHP_LSAPI_CHILDREN=8 (this is to match "Max Connections"=8)
Back Log: 10 --> 100
Instances: 10 --> 1

i.e., back to default setting as possible
 

ShannonA

Well-Known Member
#15
looks problem here. please modify and try:
Environment: PHP_LSAPI_CHILDREN=8 (this is to match "Max Connections"=8)
Back Log: 10 --> 100
Instances: 10 --> 1

i.e., back to default setting as possible
Thanks. It's possible this has helped somewhat. However, I'm definitely continuing to get WaitQs with Idle, and it's getting worse as we reach the peak of our day (noon-ish PT).
 
Last edited:
Top