Phil Endecott wrote:
[EMAIL PROTECTED] wrote:
Seems like you are right about the smax=0.

Luckily for you, according to the documentation you may control the persistency of the backend connection with the environment variable proxy-nokeepalive

Well, I can use that to switch of persistency, i.e. I can get "smax=0 ttl=0". I don't think I can use that to get "smax=0 ttl=60", can I?

I'm going to have another look at the source, and see whether I can change the sentinel value for "smax not specified" from 0 to -1, so that 0 can really mean zero.

I have tried the following:

Index: proxy_util.c
===================================================================
--- proxy_util.c        (revision 573391)
+++ proxy_util.c        (working copy)
@@ -1752,7 +1752,7 @@
         if (worker->hmax == 0 || worker->hmax > mpm_threads) {
             worker->hmax = mpm_threads;
         }
-        if (worker->smax == 0 || worker->smax > worker->hmax) {
+        if (worker->smax == -1 || worker->smax > worker->hmax) {
             worker->smax = worker->hmax;
         }
         /* Set min to be lower then smax */
Index: mod_proxy.c
===================================================================
--- mod_proxy.c (revision 573391)
+++ mod_proxy.c (working copy)
@@ -1263,6 +1263,7 @@
         }
         PROXY_COPY_CONF_PARAMS(worker, conf);

+        worker->smax = -1;
         for (i = 0; i < arr->nelts; i++) {
             const char *err = set_worker_param(cmd->pool, worker, elts[i].key,
                                                elts[i].val);

This does seem to result in smax=0 being used, but it breaks something; as far as I can see the requests never reach the backend. I have taken the source from trunk and am loading the module into my 2.2.4 server; I suppose that's far from certain to work. Or maybe the APR reslist is not designed to work with smax=0.

I would much appreciate some input from someone who knows their way around this code.

Regards,

Phil.




Reply via email to