MAX CONNECTIONS for External Apps

Discussion in 'Install/Configuration' started by ShannonA, Jan 31, 2014.

  1. ShannonA

    ShannonA Member

    I'm trying to figure out how these max connections are set

    [​IMG]
    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: Jan 31, 2014
  2. NiteWave

    NiteWave Administrator

    lsws webadmin -> Server -> General -> PHP suEXEC Max Conn
  3. ShannonA

    ShannonA Member

    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.
  4. NiteWave

    NiteWave Administrator

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

    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 ?
  5. ShannonA

    ShannonA Member

    Ah, that explains much. Thanks. That'd be nice info to have in the little tooltip "?".

    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.)
  6. NiteWave

    NiteWave Administrator

    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.
  7. ShannonA

    ShannonA Member

    I'll keep an eye on it and see if it sticks around (after I get everything tuned, now that I understand the numbering ...)
  8. NiteWave

    NiteWave Administrator

    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.
  9. ShannonA

    ShannonA Member

    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.
  10. NiteWave

    NiteWave Administrator

    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.
  11. ShannonA

    ShannonA Member

    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.
  12. NiteWave

    NiteWave Administrator

    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.
  13. ShannonA

    ShannonA Member

    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.

    [​IMG]
    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 ...
  14. NiteWave

    NiteWave Administrator

    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
  15. ShannonA

    ShannonA Member

    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: Apr 1, 2014
  16. NiteWave

    NiteWave Administrator

    can you give me access to web admin console ( :7080), just to check the settings, no modification.

Share This Page