Article delegate-en/1802 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A1799@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: 7.8.1 as W2K service: Performance, restart etc
01 Aug 2002 20:31:28 GMT feedback@delegate.org (Yutaka Sato)


Hi,

On 08/01/02(22:57) you "Hiroko Sano" <p7ydabdyi-t6uzp56erj3r.ml@ml.delegate.org> wrote
in <_A1799@delegate-en.ML_>
 |08/01 09:02:40.26 [1240] 43497+1/56: Proxy: host=D710; User-Agent:
 |Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461); DIRECT

This log shows that your DeleGate is certainly heavy loaded.  It is
"43497"th process, may be in a day, and the process is now relaying
56th request keeping the connection alive with the client...
How many http requests does your HTTP-proxy relay in a day, i.e. how
many lines in 8080.http in a day ?

Such heavy loaded situation can be caused by a small number of clients
which fires requests rapidly using a Keep-Alived connection, occupying
resources, shutting out other clients.  So reducing the maximum count
of Keep-Alive might relax the situation.  Try the following parameter
to do so.

  HTTPCONF=max-cka:10

But the following line shows the parallelism is not so much. (42) means
that there are 42 DeleGate processes running currently.

 |08/01 09:02:40.64 [1548] 43505+6: (42) accepted [49]
 |-@[10.2.136.156]XG92:1073 (17.062s)(-1)

Such number of process should be handled easily with rich hardware
resources like yours.  The problem might be caused by a process which
is abnormally occupying resources.  Don't you see such process,
occupying CPU and/or Memory, observing with the task manager ?

A possible heavy load situation can be caused by uploading large data
by POST method.  It could cause abnormal termination of DeleGate too.
Did not you see such log of POST in your 8080.http logfile ?
I fixed the problem like the enclosed patch and placed the executable
file on my FTP server.  It might solve your problem.
<URL:ftp://ftp.delegate.org/pub/DeleGate/tmp/dg7910e.exe>

 |(WIN) 02:40 [624] spawn(C:\Delegate\dg7_9_10\dg7910b.exe) = 892, no
 |response from child, 259,1/128
 |08/01 09:02:40.48 [624] 43547+0: #{TR}# ? cannot fork Sticky (0)
 |08/01 09:02:40.48 [624] 43547+0: CANNOT FORK Sequential (0)
 |(WIN) 02:40 [624] wait3() = 1348, status=0, children(alive=55,total=43209)
 |(WIN) 02:40 [624] wait3() = 852, status=0, children(alive=54,total=43209)
 |(WIN) 02:40 [624] wait3() = 1120, status=0, children(alive=53,total=43209)
 |(WIN) 02:40 [624] wait3() = 640, status=0, children(alive=52,total=43209)
 |(WIN) 02:40 [624] wait3() = 204, status=0, children(alive=51,total=43209)
 |(WIN) 02:40 [624] wait3() = 276, status=0, children(alive=50,total=43209)

Is this the log recorded when your clients are blocked out ?  If so,
could you show me more lines before here including "[624]", which is
the main process of DeleGate in this case.


Cheers,
Yutaka
--
  @ @ Yutaka Sato <y.sato@delegate.org> http://www.delegate.org/y.sato/
 ( - ) National Institute of Advanced Industrial Science and Technology (AIST)
_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
Do the more with the less -- B. Fuller


*** ../delegate7.9.10/src/http.c	Wed Jul 17 06:26:29 2002
--- http.c	Fri Aug  2 04:53:07 2002
***************
*** 91,96 ****
--- 91,98 ----
  double HTTP_TOUT_BUFF_REQBODY = 5;
  double HTTP_TOUT_QBODY = 120;
  
+ int HTTP_MAX_BUFF_REQBODY = 1024*1024;
+ 
  int HTTP_MAXHOPS = 20;
  int HTTP_MAX_REQLINE = (4*1024);
  int HTTP_MAX_REQHEAD = (12*1024);
***************
*** 3271,3276 ****
--- 3273,3289 ----
   * done in foreground before relaying the response.
   * HINT: HTTP header can be relayed in foreground without any knowledge :-D
   */
+ #define fflushbbuff(why) { \
+ 	buffered = 0; \
+ 	fputs(req,ts); \
+ 	fputs(fields,ts); \
+ 	fwrite(bbuff,1,bn,ts); \
+ 	free(bbuff); \
+ 	now = time(0); \
+ 	sv1log("#### [%s] detach reqBuff: (%dB/%dB) / (%ds/%ds)\n", \
+ 		why,bn,bleng,now-lastflush,now-start); \
+ }
+ 
  static relayRequestBodyX(Conn,fc,ts,fs,req,fields,bleng)
  	Connection *Conn;
  	FILE *fc,*ts,*fs;
***************
*** 3284,3290 ****
--- 3297,3308 ----
  	int buffered;
  
  	bsize = bleng + 1024;
+ 	if( HTTP_MAX_BUFF_REQBODY < bsize )
+ 		bsize = HTTP_MAX_BUFF_REQBODY + 1024;
+ 	bbuff = malloc(bsize);
+ /*
  	bbuff = malloc(bleng+1024);
+ */
  
  	bn = DDI_flushCbuf(Conn,bbuff,bsize);
  	DDI_proceedFromC(Conn,fc); /* it clears Cbuf ... */
***************
*** 3305,3310 ****
--- 3323,3331 ----
  		}
  		if( badServ(Conn,"beforeREQBODY",BS_QBODY,ts,fs,NULL) )
  			ts = NULLFP();
+ 
+ 		fwrite(bbuff,1,bn,ts);
+ 		free(bbuff);
  	}else{
  		buffered = 1;
  	}
***************
*** 3318,3330 ****
  			){
  				now = time(0);
  				if( buffered ){
! 					buffered = 0;
! 					fputs(req,ts);
! 					fputs(fields,ts);
! 					fwrite(bbuff,1,bn,ts);
! 					free(bbuff);
! 			sv1log("#### detach reqBuff: (%dB/%dB) / (%ds/%ds)\n",
! 					bn,bleng,now-lastflush,now-start);
  				}
  				fflush(ts);
  				lastflush = now;
--- 3339,3345 ----
  			){
  				now = time(0);
  				if( buffered ){
! 					fflushbbuff("timeout");
  				}
  				fflush(ts);
  				lastflush = now;
***************
*** 3341,3346 ****
--- 3356,3366 ----
  		if( ch == EOF ){
  			setClientEOF(Conn,fc,"relayRequestBody-2");
  			break;
+ 		}
+ 		if( buffered ){
+ 			if( HTTP_MAX_BUFF_REQBODY <= bn ){
+ 				fflushbbuff("bufsize");
+ 			}
  		}
  		if( buffered ){
  			if( bsize <= bn ){

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V