httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Ylavic <ylavic....@gmail.com>
Subject Re: [users@httpd] problems benchmarking php-fpm/proxy_fcgi with h2load
Date Fri, 19 Jan 2018 16:40:29 GMT
On Fri, Jan 19, 2018 at 5:14 PM, Yann Ylavic <ylavic.dev@gmail.com> wrote:
> On Fri, Jan 19, 2018 at 1:46 PM, Daniel <dferradal@gmail.com> wrote:
>> I vaguely recall some issue with reuse when using unix socket files so
>> it was deliberately set to off by default, but yes, perhaps someone
>> experienced enough with mod_proxy_fcgi inner workings can shed some
>> light on this and the why yes/not.
>>
>> With socket files I never tried to enable "enablereuse=on" and got
>> much successful results, so perhaps it's safer to keep it off until
>> someone clarifies this issue, after all when dealing with unix sockets
>> the access delays are quite low.
>
> {en,dis}ablereuse has no effect on Unix Domain Sockets in mod_proxy,
> they are never reused.

Well, actually it shouldn't, but while the code clearly doesn't reuse
sockets (creates a new one for each request), nothing seems to tell
the recycler that it should close them unconditionally at the end of
the request.

So there may be a (fd) leak here, which could explain why it does not
work after a while...

I'm thinking of something like this:

Index: modules/proxy/proxy_util.c
===================================================================
--- modules/proxy/proxy_util.c    (revision 1821662)
+++ modules/proxy/proxy_util.c    (working copy)
@@ -2756,6 +2756,8 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const
 #if APR_HAVE_SYS_UN_H
         if (conn->uds_path)
         {
+            conn->close = 1; /* UDS sockets are not recycled */
+
             rv = apr_socket_create(&newsock, AF_UNIX, SOCK_STREAM, 0,
                                    conn->scpool);
             if (rv != APR_SUCCESS) {
@@ -2767,7 +2769,6 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const
                              worker->s->hostname);
                 break;
             }
-            conn->connection = NULL;

             rv = ap_proxy_connect_uds(newsock, conn->uds_path, conn->scpool);
             if (rv != APR_SUCCESS) {
_


Regards,
Yann.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message