You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Chandrakant Solanki <so...@gmail.com> on 2011/11/18 08:34:10 UTC
CLOSE_WAIT Connection Issue
Hi All,
I am using apache-tomcat 6.0.26 and below is my server.xml
<Connector port="8080" protocol="org.apache.coyote.
http11.Http11NioProtocol"
redirectPort="8443" maxKeepAliveRequests="1"
maxThreads="5000" minSpareThreads="100"
maxSpareThreads="300"
processCache="500" acceptorThreadCount="1"
enableLookups="false" disableUploadTimeout="false"
connectionUploadTimeout="240000"
compression="on"
compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml"
acceptCount="50"
connectionTimeout="60000"
/>
<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
maxThreads="10000" minSpareThreads="100"
maxSpareThreads="300"
processCache="500" acceptorThreadCount="1"
enableLookups="false" disableUploadTimeout="false"
connectionUploadTimeout="240000"
compression="on" connectionTimeout="60000"
compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml"
acceptCount="50" scheme="https" secure="true"
address="X.X.X.X" allowTrace="false"
SSLEnabled="true"
SSLCertificateFile="...."
SSLCertificateKeyFile="..."
clientAuth="false" sslProtocol="TLSv1"
maxKeepAliveRequests="1"/>
I have executed CURL request, around 5000 and after that I kill all my curl
process. So, all ESTABLISHED connection becomes in CLOSE_WAIT state.
Is any configuration is missing or doing something wrong..
Please help me out.
--
Regards,
Chandrakant Solanki
Re: CLOSE_WAIT Connection Issue
Posted by Pid * <pi...@pidster.com>.
On 18 Nov 2011, at 08:49, Chandrakant Solanki
<so...@gmail.com> wrote:
> Hi,
>
> 1] having one project in webapps, which will hold connection for 45 seconds.
> 2] I executed 5000 CURL request, on above project.
> 3] And then from Clinet Side, from where, I execute curl, kill all curl
> process.
>
> So, on server all ESTABLISHED becomes, CLOSE_WAIT in netstat
Another clear description of what you're seeing, thanks - but what is
the problem?
What do you expect or want to happen?
p
>
>
> tcp 0 0 10.168.43.69:8080 115.113.7.178:1197
> CLOSE_WAIT 10761/java
> tcp 1 0 10.168.43.69:8080 115.113.7.178:1965
> CLOSE_WAIT 10761/java
> tcp 294 0 10.168.43.69:8080 115.113.7.178:1709
> CLOSE_WAIT 10761/java
> tcp 0 0 10.168.43.69:8080 115.113.7.178:64429
> CLOSE_WAIT 10761/java
> tcp 1 0 10.168.43.69:8080 115.113.7.178:64941
> CLOSE_WAIT 10761/java
> tcp 0 0 10.168.43.69:8080 115.113.7.178:64685
> CLOSE_WAIT 10761/java
> tcp 294 0 10.168.43.69:8080 115.113.7.178:4268
> CLOSE_WAIT 10761/java
> tcp 1 0 10.168.43.69:8080 115.113.7.178:4780
> CLOSE_WAIT 10761/java
> tcp 1 0 10.168.43.69:8080 115.113.7.178:5036
> CLOSE_WAIT 10761/java
> tcp 294 0 10.168.43.69:8080 115.113.7.178:2220
> CLOSE_WAIT 10761/java
> tcp 1 0 10.168.43.69:8080 115.113.7.178:2476
> CLOSE_WAIT 10761/java
> tcp 1 0 10.168.43.69:8080 115.113.7.178:2732
> CLOSE_WAIT 10761/java
> tcp 294 0 10.168.43.69:8080 115.113.7.178:2988
> CLOSE_WAIT 10761/java
> tcp 1 0 10.168.43.69:8080 115.113.7.178:3244
> CLOSE_WAIT 10761/java
> tcp 1 0 10.168.43.69:8080 115.113.7.178:3500
> CLOSE_WAIT 10761/java
> tcp 294 0 10.168.43.69:8080 115.113.7.178:3756
> CLOSE_WAIT 10761/java
> tcp 1 0 10.168.43.69:8080 115.113.7.178:4012
> CLOSE_WAIT 10761/java
> tcp 0 0 10.168.43.69:8080 115.113.7.178:1196
> CLOSE_WAIT 10761/java
> tcp 294 0 10.168.43.69:8080 115.113.7.178:1452
> CLOSE_WAIT 10761/java
> tcp 294 0 10.168.43.69:8080 115.113.7.178:1708
> CLOSE_WAIT 10761/java
> tcp 294 0 10.168.43.69:8080 115.113.7.178:1964
> CLOSE_WAIT 10761/java
> tcp 1 0 10.168.43.69:8080 115.113.7.178:64428
> CLOSE_WAIT 10761/java
> tcp 0 0 10.168.43.69:8080 115.113.7.178:64684
> CLOSE_WAIT 10761/java
> tcp 1 0 10.168.43.69:8080 115.113.7.178:64940
> CLOSE_WAIT 10761/java
> tcp 126 0 10.168.43.69:8080 10.168.86.11:55709
> CLOSE_WAIT 10761/java
> tcp 294 0 10.168.43.69:8080 115.113.7.178:5039
> CLOSE_WAIT 10761/java
> tcp 1 0 10.168.43.69:8080 115.113.7.178:4783
> CLOSE_WAIT 10761/java
> tcp 294 0 10.168.43.69:8080 115.113.7.178:4271
> CLOSE_WAIT 10761/java
>
> On Fri, Nov 18, 2011 at 1:22 PM, Pid * <pi...@pidster.com> wrote:
>
>> On 18 Nov 2011, at 07:34, Chandrakant Solanki
>> <so...@gmail.com> wrote:
>>
>>> Hi All,
>>>
>>> I am using apache-tomcat 6.0.26 and below is my server.xml
>>>
>>> <Connector port="8080" protocol="org.apache.coyote.
>>> http11.Http11NioProtocol"
>>> redirectPort="8443" maxKeepAliveRequests="1"
>>> maxThreads="5000" minSpareThreads="100"
>>> maxSpareThreads="300"
>>> processCache="500" acceptorThreadCount="1"
>>> enableLookups="false" disableUploadTimeout="false"
>>> connectionUploadTimeout="240000"
>>> compression="on"
>>> compressionMinSize="2048"
>>> noCompressionUserAgents="gozilla, traviata"
>>> compressableMimeType="text/html,text/xml"
>>> acceptCount="50"
>>> connectionTimeout="60000"
>>> />
>>>
>>> <Connector port="8443"
>> protocol="org.apache.coyote.http11.Http11Protocol"
>>> maxThreads="10000" minSpareThreads="100"
>>> maxSpareThreads="300"
>>> processCache="500" acceptorThreadCount="1"
>>> enableLookups="false" disableUploadTimeout="false"
>>> connectionUploadTimeout="240000"
>>> compression="on" connectionTimeout="60000"
>>> compressionMinSize="2048"
>>> noCompressionUserAgents="gozilla, traviata"
>>> compressableMimeType="text/html,text/xml"
>>> acceptCount="50" scheme="https" secure="true"
>>> address="X.X.X.X" allowTrace="false"
>>> SSLEnabled="true"
>>> SSLCertificateFile="...."
>>> SSLCertificateKeyFile="..."
>>> clientAuth="false" sslProtocol="TLSv1"
>>> maxKeepAliveRequests="1"/>
>>>
>>>
>>> I have executed CURL request, around 5000 and after that I kill all my
>> curl
>>> process. So, all ESTABLISHED connection becomes in CLOSE_WAIT state.
>>
>> You have described some TCP states.
>> Can you state what the problem is please?
>>
>>
>> p
>>
>>>
>>> Is any configuration is missing or doing something wrong..
>>>
>>> Please help me out.
>>>
>>>
>>> --
>>> Regards,
>>>
>>> Chandrakant Solanki
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
>
> --
> Regards,
>
> Chandrakant Solanki
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: CLOSE_WAIT Connection Issue
Posted by Marvin Addison <ma...@gmail.com>.
> 3] And then from Clinet Side, from where, I execute curl, kill all curl
> process.
> So, on server all ESTABLISHED becomes, CLOSE_WAIT in netstat.
I'd imagine kill -KILL or kill -TERM is preventing proper socket
teardown. The server is expecting ACKs from the clients that
apparently not being sent. That's certainly expected behavior for the
KILL signal. I might expect curl to handle the TERM signal gracefully
by tearing down the connections before exiting, but I've never tried.
M
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: CLOSE_WAIT Connection Issue
Posted by Chandrakant Solanki <so...@gmail.com>.
Hi,
1] having one project in webapps, which will hold connection for 45 seconds.
2] I executed 5000 CURL request, on above project.
3] And then from Clinet Side, from where, I execute curl, kill all curl
process.
So, on server all ESTABLISHED becomes, CLOSE_WAIT in netstat.
tcp 0 0 10.168.43.69:8080 115.113.7.178:1197
CLOSE_WAIT 10761/java
tcp 1 0 10.168.43.69:8080 115.113.7.178:1965
CLOSE_WAIT 10761/java
tcp 294 0 10.168.43.69:8080 115.113.7.178:1709
CLOSE_WAIT 10761/java
tcp 0 0 10.168.43.69:8080 115.113.7.178:64429
CLOSE_WAIT 10761/java
tcp 1 0 10.168.43.69:8080 115.113.7.178:64941
CLOSE_WAIT 10761/java
tcp 0 0 10.168.43.69:8080 115.113.7.178:64685
CLOSE_WAIT 10761/java
tcp 294 0 10.168.43.69:8080 115.113.7.178:4268
CLOSE_WAIT 10761/java
tcp 1 0 10.168.43.69:8080 115.113.7.178:4780
CLOSE_WAIT 10761/java
tcp 1 0 10.168.43.69:8080 115.113.7.178:5036
CLOSE_WAIT 10761/java
tcp 294 0 10.168.43.69:8080 115.113.7.178:2220
CLOSE_WAIT 10761/java
tcp 1 0 10.168.43.69:8080 115.113.7.178:2476
CLOSE_WAIT 10761/java
tcp 1 0 10.168.43.69:8080 115.113.7.178:2732
CLOSE_WAIT 10761/java
tcp 294 0 10.168.43.69:8080 115.113.7.178:2988
CLOSE_WAIT 10761/java
tcp 1 0 10.168.43.69:8080 115.113.7.178:3244
CLOSE_WAIT 10761/java
tcp 1 0 10.168.43.69:8080 115.113.7.178:3500
CLOSE_WAIT 10761/java
tcp 294 0 10.168.43.69:8080 115.113.7.178:3756
CLOSE_WAIT 10761/java
tcp 1 0 10.168.43.69:8080 115.113.7.178:4012
CLOSE_WAIT 10761/java
tcp 0 0 10.168.43.69:8080 115.113.7.178:1196
CLOSE_WAIT 10761/java
tcp 294 0 10.168.43.69:8080 115.113.7.178:1452
CLOSE_WAIT 10761/java
tcp 294 0 10.168.43.69:8080 115.113.7.178:1708
CLOSE_WAIT 10761/java
tcp 294 0 10.168.43.69:8080 115.113.7.178:1964
CLOSE_WAIT 10761/java
tcp 1 0 10.168.43.69:8080 115.113.7.178:64428
CLOSE_WAIT 10761/java
tcp 0 0 10.168.43.69:8080 115.113.7.178:64684
CLOSE_WAIT 10761/java
tcp 1 0 10.168.43.69:8080 115.113.7.178:64940
CLOSE_WAIT 10761/java
tcp 126 0 10.168.43.69:8080 10.168.86.11:55709
CLOSE_WAIT 10761/java
tcp 294 0 10.168.43.69:8080 115.113.7.178:5039
CLOSE_WAIT 10761/java
tcp 1 0 10.168.43.69:8080 115.113.7.178:4783
CLOSE_WAIT 10761/java
tcp 294 0 10.168.43.69:8080 115.113.7.178:4271
CLOSE_WAIT 10761/java
On Fri, Nov 18, 2011 at 1:22 PM, Pid * <pi...@pidster.com> wrote:
> On 18 Nov 2011, at 07:34, Chandrakant Solanki
> <so...@gmail.com> wrote:
>
> > Hi All,
> >
> > I am using apache-tomcat 6.0.26 and below is my server.xml
> >
> > <Connector port="8080" protocol="org.apache.coyote.
> > http11.Http11NioProtocol"
> > redirectPort="8443" maxKeepAliveRequests="1"
> > maxThreads="5000" minSpareThreads="100"
> > maxSpareThreads="300"
> > processCache="500" acceptorThreadCount="1"
> > enableLookups="false" disableUploadTimeout="false"
> > connectionUploadTimeout="240000"
> > compression="on"
> > compressionMinSize="2048"
> > noCompressionUserAgents="gozilla, traviata"
> > compressableMimeType="text/html,text/xml"
> > acceptCount="50"
> > connectionTimeout="60000"
> > />
> >
> > <Connector port="8443"
> protocol="org.apache.coyote.http11.Http11Protocol"
> > maxThreads="10000" minSpareThreads="100"
> > maxSpareThreads="300"
> > processCache="500" acceptorThreadCount="1"
> > enableLookups="false" disableUploadTimeout="false"
> > connectionUploadTimeout="240000"
> > compression="on" connectionTimeout="60000"
> > compressionMinSize="2048"
> > noCompressionUserAgents="gozilla, traviata"
> > compressableMimeType="text/html,text/xml"
> > acceptCount="50" scheme="https" secure="true"
> > address="X.X.X.X" allowTrace="false"
> > SSLEnabled="true"
> > SSLCertificateFile="...."
> > SSLCertificateKeyFile="..."
> > clientAuth="false" sslProtocol="TLSv1"
> > maxKeepAliveRequests="1"/>
> >
> >
> > I have executed CURL request, around 5000 and after that I kill all my
> curl
> > process. So, all ESTABLISHED connection becomes in CLOSE_WAIT state.
>
> You have described some TCP states.
> Can you state what the problem is please?
>
>
> p
>
> >
> > Is any configuration is missing or doing something wrong..
> >
> > Please help me out.
> >
> >
> > --
> > Regards,
> >
> > Chandrakant Solanki
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
--
Regards,
Chandrakant Solanki
Re: CLOSE_WAIT Connection Issue
Posted by Pid * <pi...@pidster.com>.
On 18 Nov 2011, at 07:34, Chandrakant Solanki
<so...@gmail.com> wrote:
> Hi All,
>
> I am using apache-tomcat 6.0.26 and below is my server.xml
>
> <Connector port="8080" protocol="org.apache.coyote.
> http11.Http11NioProtocol"
> redirectPort="8443" maxKeepAliveRequests="1"
> maxThreads="5000" minSpareThreads="100"
> maxSpareThreads="300"
> processCache="500" acceptorThreadCount="1"
> enableLookups="false" disableUploadTimeout="false"
> connectionUploadTimeout="240000"
> compression="on"
> compressionMinSize="2048"
> noCompressionUserAgents="gozilla, traviata"
> compressableMimeType="text/html,text/xml"
> acceptCount="50"
> connectionTimeout="60000"
> />
>
> <Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
> maxThreads="10000" minSpareThreads="100"
> maxSpareThreads="300"
> processCache="500" acceptorThreadCount="1"
> enableLookups="false" disableUploadTimeout="false"
> connectionUploadTimeout="240000"
> compression="on" connectionTimeout="60000"
> compressionMinSize="2048"
> noCompressionUserAgents="gozilla, traviata"
> compressableMimeType="text/html,text/xml"
> acceptCount="50" scheme="https" secure="true"
> address="X.X.X.X" allowTrace="false"
> SSLEnabled="true"
> SSLCertificateFile="...."
> SSLCertificateKeyFile="..."
> clientAuth="false" sslProtocol="TLSv1"
> maxKeepAliveRequests="1"/>
>
>
> I have executed CURL request, around 5000 and after that I kill all my curl
> process. So, all ESTABLISHED connection becomes in CLOSE_WAIT state.
You have described some TCP states.
Can you state what the problem is please?
p
>
> Is any configuration is missing or doing something wrong..
>
> Please help me out.
>
>
> --
> Regards,
>
> Chandrakant Solanki
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: CLOSE_WAIT Connection Issue
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Chandrakant,
This is a bit OT from your original "question":
On 11/18/11 2:34 AM, Chandrakant Solanki wrote:
> <Connector port="8080" protocol="org.apache.coyote.
> http11.Http11NioProtocol" maxThreads="5000" minSpareThreads="100"
> maxSpareThreads="300"
> <Connector port="8443"
> protocol="org.apache.coyote.http11.Http11Protocol"
> maxThreads="10000" minSpareThreads="100" maxSpareThreads="300"
minSpareThreads and maxSpareThreads are not documented attributes in
http://tomcat.apache.org/tomcat-6.0-doc/config/http.html (except for
one curious mention of them under the description for "useExecutor").
Why are you using them?
I think you probably want to be using an Executor
(http://tomcat.apache.org/tomcat-6.0-doc/config/executor.html) which
/does/ support similar configuration (and will share threads between
these two connectors, which will probably be nice).
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk7GezQACgkQ9CaO5/Lv0PCHIgCfU9+7YMlOcVZcqWN0MRsQsWSN
7GoAnR5GUHk7u1lg8kVJ9mwn7GzSW0zM
=14Tj
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org