From: Michael Chase-S. <mc...@us...> - 2011-09-09 21:32:45
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv20198 Modified Files: ChangeLog NEWS README control.c httpAdapter.c sfcb.cfg.pre.in Log Message: [ 3406823 ] Make select timeout a config option. Index: ChangeLog =================================================================== RCS file: /cvsroot/sblim/sfcb/ChangeLog,v retrieving revision 1.683 retrieving revision 1.684 diff -u -d -r1.683 -r1.684 --- ChangeLog 6 Sep 2011 23:35:56 -0000 1.683 +++ ChangeLog 9 Sep 2011 21:32:43 -0000 1.684 @@ -1,3 +1,8 @@ +2011-09-09 Michael Chase-Salerno <br...@li...> + + * httpAdapter.c, sfcb.cfg.pre.in, control.c: + [ 3406823 ] Make select timeout a config option. + 2011-09-06 Michael Chase-Salerno <br...@li...> * httpAdapter.c: Index: sfcb.cfg.pre.in =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcb.cfg.pre.in,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- sfcb.cfg.pre.in 29 Apr 2011 21:40:50 -0000 1.25 +++ sfcb.cfg.pre.in 9 Sep 2011 21:32:43 -0000 1.26 @@ -58,6 +58,10 @@ ## Default is: sfcBasicAuthentication basicAuthLib: @SFCB_CONF_BASICAUTHLIB@ +## Maximum time in seconds an sfcb HTTP process will wait for select. +## Default is 5 +#selectTimeout: 5 + ## Maximum time in seconds an sfcb HTTP process will wait between two requests ## on one connection before terminating. 0 will disable HTTP keep-alive. ## Default is 15 Index: httpAdapter.c =================================================================== RCS file: /cvsroot/sblim/sfcb/httpAdapter.c,v retrieving revision 1.91 retrieving revision 1.92 diff -u -d -r1.91 -r1.92 --- httpAdapter.c 6 Sep 2011 23:35:56 -0000 1.91 +++ httpAdapter.c 9 Sep 2011 21:32:43 -0000 1.92 @@ -88,7 +88,8 @@ static long keepaliveTimeout=15; static long keepaliveMaxRequest=10; static long numRequest; -struct timeval httpSelectTimeout = {5, 0}; /* 5 sec. timeout for select() before read() */ +static long selectTimeout = 5; /* default 5 sec. timeout for select() before read() */ +struct timeval httpSelectTimeout = {0, 0}; #if defined USE_SSL static SSL_CTX *ctx; @@ -1566,6 +1567,11 @@ doUdsAuth = 0; #endif + // Get selectTimeout from the config file, or use 5 if not set + if (getControlNum("selectTimeout", &selectTimeout)) + selectTimeout = 5; + httpSelectTimeout.tv_sec=selectTimeout; + if (getControlNum("keepaliveTimeout", &keepaliveTimeout)) keepaliveTimeout = 15; @@ -1633,6 +1639,8 @@ "--- Using Unix Socket Peer Cred Authentication\n"); #endif + mlogf(M_INFO, M_SHOW, "--- Select timeout: %ld seconds\n",selectTimeout); + if (keepaliveTimeout == 0) { mlogf(M_INFO, M_SHOW, "--- Keep-alive timeout disabled\n"); } else { Index: README =================================================================== RCS file: /cvsroot/sblim/sfcb/README,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- README 8 Nov 2010 23:43:14 -0000 1.55 +++ README 9 Sep 2011 21:32:43 -0000 1.56 @@ -490,6 +490,7 @@ doBasicAuth: false basicAuthLib: sfcBasicAuthentication useChunking: true + selectTimeout: 5 keepaliveTimeout: 0 keepaliveMaxRequest: 10 sslKeyFilePath: /usr/local/etc/sfcb/file.pem @@ -554,9 +555,15 @@ sfcb should/not advertise wbem services with the DA Default=true +selectTimeout + Specify the maximum time in seconds for the HTTP select to complete. + Default is 5 seconds. + slpRefreshInterval timeinterval in seconds in which the slp process refreshes information + + keepaliveTimeout Specify the maximum time in seconds an sfcb HTTP process will wait between two requests on one connection before terminating. Setting Index: NEWS =================================================================== RCS file: /cvsroot/sblim/sfcb/NEWS,v retrieving revision 1.607 retrieving revision 1.608 diff -u -d -r1.607 -r1.608 --- NEWS 6 Sep 2011 23:35:56 -0000 1.607 +++ NEWS 9 Sep 2011 21:32:43 -0000 1.608 @@ -1,6 +1,10 @@ Changes in 1.3.13 ================= +New features: + +- 3406823 Make select timeout a config option. + Bugs fixed: - 3386391 HOST_NAME_MAX undefined Index: control.c =================================================================== RCS file: /cvsroot/sblim/sfcb/control.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- control.c 21 Jun 2011 16:07:32 -0000 1.38 +++ control.c 9 Sep 2011 21:32:43 -0000 1.39 @@ -94,6 +94,7 @@ {"keepaliveTimeout", 1, "15"}, {"keepaliveMaxRequest", 1, "10"}, + {"selectTimeout", 1, "5"}, {"providerSampleInterval", 1, "30"}, {"providerTimeoutInterval", 1, "60"}, |