[syslog-ng]Max number of TCP connections?

Chris Sibbitt CSibbitt@jetnet.ca
Mon, 12 Nov 2001 17:34:41 -0500


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01C16BCA.38296F90
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C16BCA.38296F90"


------_=_NextPart_001_01C16BCA.38296F90
Content-Type: text/plain;
	charset="iso-8859-1"

SUMMARY: How many connection can I have to a tcp() source? 10? Why?
 
 I have been experiencing a problem with a syslog-ng (1.4.11) server
seemingly only allowing 10 connections to a tcp() source. A quick tour of
the code found the offending code at line 341 in afinet.c:
 
self->super.max_connections = 10;
 
 Elsewhere in the file I see this (with code missing):        
if (c->num_connections >= c->max_connections) {
    #FAIL TO CONNECT
}else{
    #SUCCESSFULLY CONNECT
}
 
 Unless this is not the code to handle tcp() sources, I think I've found
what I need to change in order to fix this. My question is to Balazs, or
anyone else with insight into the design of this daemon: Why is the limit
set to 10? I want to change it, potentially to something very high (100
sounds about right for now), what impact is this going to have? 
 
JetNet Logo
Chris Sibbitt
Operations Development
333 Preston St, 3rd floor
Ottawa, Ontario K1S 5N4
Phone (613) 237-5995, ext228
Fax     (613) 237-9002
 

------_=_NextPart_001_01C16BCA.38296F90
Content-Type: text/html;
	charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 5.00.2314.1000" name=GENERATOR></HEAD>
<BODY>
<DIV align=left><FONT face=Arial size=2><SPAN class=314422822-12112001>SUMMARY: 
How many connection can I have to a tcp() source? 10? Why?</SPAN></FONT></DIV>
<DIV align=left><FONT face=Arial size=2><SPAN 
class=314422822-12112001></SPAN></FONT><FONT face=Arial size=2><SPAN 
class=314422822-12112001></SPAN></FONT>&nbsp;</DIV>
<DIV align=left><FONT face=Arial size=2><SPAN class=314422822-12112001>&nbsp;I 
have been experiencing a problem with a syslog-ng (1.4.11) server seemingly only 
allowing 10 connections to a tcp() source. A quick tour of the code found the 
offending&nbsp;code at line 341 in afinet.c:</SPAN></FONT></DIV>
<DIV align=left><FONT face=Arial size=2><SPAN 
class=314422822-12112001></SPAN></FONT>&nbsp;</DIV>
<DIV align=left><FONT face=Arial size=2><SPAN 
class=314422822-12112001>self-&gt;super.max_connections = 
10;</SPAN></FONT></DIV>
<DIV align=left><FONT face=Arial size=2><SPAN 
class=314422822-12112001></SPAN></FONT>&nbsp;</DIV>
<DIV align=left><FONT face=Arial size=2><SPAN 
class=314422822-12112001>&nbsp;Elsewhere in the file I see this (with code 
missing):&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></FONT></DIV>
<DIV align=left><FONT face=Arial size=2><SPAN class=314422822-12112001>if 
(c-&gt;num_connections &gt;= c-&gt;max_connections) {<BR>&nbsp;&nbsp;&nbsp; 
#FAIL TO CONNECT</SPAN></FONT></DIV>
<DIV align=left><FONT face=Arial size=2><SPAN 
class=314422822-12112001>}else{</SPAN></FONT></DIV>
<DIV align=left><FONT face=Arial size=2><SPAN 
class=314422822-12112001></SPAN></FONT><FONT face=Arial size=2><SPAN 
class=314422822-12112001>&nbsp;&nbsp;&nbsp;&nbsp;#SUCCESSFULLY 
CONNECT</SPAN></FONT></DIV>
<DIV align=left><FONT face=Arial size=2><SPAN 
class=314422822-12112001>}</SPAN></FONT></DIV>
<DIV align=left><FONT face=Arial size=2><SPAN 
class=314422822-12112001></SPAN></FONT>&nbsp;</DIV>
<DIV align=left><FONT face=Arial size=2><SPAN 
class=314422822-12112001>&nbsp;Unless this is not the code to handle tcp() 
sources, I think I've found what I need to change in order to fix this. My 
question is to Balazs,&nbsp;or anyone else with insight into the design of this 
daemon: Why is the limit set to 10? I want to change it, potentially to 
something very high (100 sounds about right for now), what impact is 
this&nbsp;going to have?&nbsp;</SPAN></FONT></DIV>
<DIV align=left>&nbsp;</DIV>
<DIV><IMG align=baseline alt="JetNet Logo" border=0 hspace=0 
src="cid:314422822@12112001-264d"></DIV>
<DIV><FONT face=Arial size=2>Chris Sibbitt</FONT></DIV>
<DIV><FONT face=Arial size=2>Operations Development</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT></DIV>
<DIV><FONT face=Arial size=2>333 Preston St, 3rd floor</FONT></DIV>
<DIV><FONT face=Arial size=2>Ottawa, Ontario K1S 5N4</FONT></DIV>
<DIV><FONT face=Arial size=2>Phone (613) 237-5995, ext228</FONT></DIV>
<DIV><FONT face=Arial size=2>Fax&nbsp;&nbsp;&nbsp;&nbsp; (613) 
237-9002</FONT></DIV>
<DIV>&nbsp;</DIV></BODY></HTML>

------_=_NextPart_001_01C16BCA.38296F90--

------_=_NextPart_000_01C16BCA.38296F90
Content-Type: image/gif;
	name="200x40.gif"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
	filename="200x40.gif"
Content-ID: <314422822@12112001-264d>

R0lGODlhyAAnAPf/AP///wgICBAQEBgYGCEhISkpKTExMTk5OUJCQkpKSlJSUlpaWmNjY2tra3Nz
c3t7e4SEhIyMjJSUlJycnKWlpa2trbW1tb29vcbGxs7OztbW1t7e3ufn5+/v7/f39+/n5/fv7//3
987GxtbOzt7W1ufe3r21ta2lpbWtrca9vZSMjJyUlKWcnIyEhHNra4R7e2tjY1pSUmNaWlJKSkpC
QkI5OTkxMTEpKVpKSikhISEYGAgAAGtaUrWlnOfe1sa9tYR7c2NaUkI5MbWtpZyUjFpSSlJKQjkx
KUpCOe/v5///987OxtbWzt7e1ufn3r29ta2tpbW1rcbGvZSUjJyclKWlnHt7c3Nza2trY1paUmNj
WlJSSkpKQkJCOTk5MTExKSkpISEhGBgYEOfv5+/37/f/98bOxs7Wztbe1t7n3rW9ta21rb3GvYyU
jJSclJylnISMhHN7c2tza3uEe2NrY1JaUlpjWkpSSkJKQikxKSEpIRghGBAYEAAIAAAQAAAYAAAh
AAApAAAxAAA5AABKAABSAABaAABjAABrAABzAAB7AACE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