]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: optionally call FCGX_Free() on the fcgi connection 3124/head
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 26 Nov 2014 23:18:07 +0000 (15:18 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Tue, 9 Dec 2014 17:43:32 +0000 (09:43 -0800)
Fixes: #10194
A new configurable controls this behavior. This forces disconnection of
the fcgi connection when done with the request.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/common/config_opts.h
src/rgw/rgw_main.cc

index 12c293aee2beee21a2668f702844b322444e04e5..7791246aa9ce4a2b00ca19e3d7013d12f065db9b 100644 (file)
@@ -770,6 +770,7 @@ OPTION(rgw_cache_lru_size, OPT_INT, 10000)   // num of entries in rgw cache
 OPTION(rgw_socket_path, OPT_STR, "")   // path to unix domain socket, if not specified, rgw will not run as external fcgi
 OPTION(rgw_host, OPT_STR, "")  // host for radosgw, can be an IP, default is 0.0.0.0
 OPTION(rgw_port, OPT_STR, "")  // port to listen, format as "8080" "5000", if not specified, rgw will not run external fcgi
+OPTION(rgw_fcgi_explicit_free, OPT_BOOL, true) // whether to call FCGX_Free explicitly on every complete request
 OPTION(rgw_dns_name, OPT_STR, "")
 OPTION(rgw_script_uri, OPT_STR, "") // alternative value for SCRIPT_URI if not set in request
 OPTION(rgw_request_uri, OPT_STR,  "") // alternative value for REQUEST_URI if not set in request
index 80e29937e615e2825f4e69fd9b0ee5f412669341..5fa3279da318c77345994b8eea8c9c1ddec50342 100644 (file)
@@ -639,6 +639,10 @@ void RGWFCGXProcess::handle_request(RGWRequest *r)
 
   FCGX_Finish_r(fcgx);
 
+  if (store->ctx()->_conf->rgw_fcgi_explicit_free) {
+    FCGX_Free(fcgx, 1);
+  }
+
   delete req;
 }