You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by 许明 <hs...@qq.com> on 2015/06/30 19:22:15 UTC

回复: 回复: why only 2 requests for async request can raise from a end-point?

Hi, Christopher,


yes, i connect tomcat directly, port is 8080.


I wrote the test tool in pure non-block mode, so just one thread in c#, and i used webbrowser, wget, telnet to perform this test too. 


It's very strange that it wont happen when the tomcat run in localhost, this problem exist only between different machines. and I had write a simple echo server for compare, the echo server can accept many connection as expected.


now i run tomcat in embed mode, hope i can find out what happened...


Thanks




------------------ 原始邮件 ------------------
发件人: "Christopher Schultz";<ch...@christopherschultz.net>;
发送时间: 2015年7月1日(星期三) 凌晨1:04
收件人: "Tomcat Users List"<us...@tomcat.apache.org>; 

主题: Re: 回复: why only 2 requests for async request can raise from a end-point?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

许明,

On 6/29/15 5:37 AM, 许明 wrote:
> I wrote a test tool with c#, not with browser, and each request
> has it's own session, that browser not support now.
> 
> And, PHP and IIS can change option to set the limitation of one 
> end-point requests, so i can't agree browser has this limit.
> 
> I have run tomcat in localhost, and 100 requests are allowed, it's 
> only appear when the server and client run on different machine.

Are you connecting directly to Tomcat, or are you connecting through IIS
?

How many threads are you starting in your C# driver?

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVkswtAAoJEBzwKT+lPKRY63YP/iDSLQRyZF9rzpKmj1Y+zzGw
wByBGhbT/kjUpTZ5nCOz7b3alDhJCiZ5EHXdC5h9vAiQWp0nM1VUz7uDpH0wrAxp
97xxR4BzTmwE+HzvehXWP6gpw3UZkWN4ILEi51qyYYkCVyy2ZxO3D2jDXHMvM4Aj
rdUrktB7rDhLKi/0RB18NjfmIWxvWF1HbXaEkFK6NZh0bu0B7mVuKmba2bJmFJRM
OCMaeP8WC1//2DH2+S4/QWro++tugFUE+vV+xUsW2kd4DEtczi6ZwvGnCD7uuyZc
a2T/eDe0GDP4aguBGJkP/l61X1NHHnW5vLAx26/b6f4ZJCZ9yXOdxt4b0tihHVXq
aGgcHnL6P2Z39HZZpDAdRQ46XzohkVfd4zcb+QTAEZzjzvy7r0u/Y/s4WwZwxZYk
jTMM1FEfezbiTVkd+Kvc21s8HLGHa/Ftb0m8Ywt9ISWmCWUdOMY8RNPsQ0oa6TNH
LQ9luPgg8tAe5o4aK2q1MLV9BjbrzcPCWYGMPHLCZ3rCRWj1llAmcYO9Y5VxT2xT
zirtT9VWE5hc6bYQI1irNrpPQblOBJOJlzVE4Gbb4EY87fGJZKVx6DXfXnQiy0SS
ib787uUqCiSTXbS7Jw0uZOlhRj1T5UvjzV++FTYdcH5xCIqQasvBXb6LzfLp0A8+
B48cov2uWgAQ61a+Qg7B
=w5AE
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org

回复: 回复: 回复: why only 2 requests for async request can raise from a end-point?

Posted by 许明 <hs...@qq.com>.
sorry, it's a .net problem


.net - How can I programmatically remove the 2 connection limit in WebClient - Stack Overflow
http://stackoverflow.com/questions/866350/how-can-i-programmatically-remove-the-2-connection-limit-in-webclient



There is a limit in the number of simultaneous outgoing HTTP connections. I think you can control this by using the System.Net.ServicePointManager.DefaultConnectionLimit static property before creating the HttpWebRequest objects.




------------------ 原始邮件 ------------------
发件人: "许明";<hs...@qq.com>;
发送时间: 2015年7月1日(星期三) 中午11:42
收件人: "users"<us...@tomcat.apache.org>; 

主题: 回复: 回复: 回复: why only 2 requests for async request can raise from a end-point?



Hi Christopher,


after your advise, i recheck all arround, and it's really raise from the c# test program.  :(


there is a bug in WebRequest, i dont know what happend in this class, since requesting to localhost is ok. and if pure Socket, or WebClient.DownloadStringAsync wont meet this bug. if not your firm advice, i will never doubt about this.




Best Regards


------------------ 原始邮件 ------------------
发件人: "Christopher Schultz";<ch...@christopherschultz.net>;
发送时间: 2015年7月1日(星期三) 凌晨2:00
收件人: "Tomcat Users List"<us...@tomcat.apache.org>; 

主题: Re: 回复: 回复: why only 2 requests for async request can raise from a end-point?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

许明,

On 6/30/15 1:22 PM, 许明 wrote:
> yes, i connect tomcat directly, port is 8080.
> 
> I wrote the test tool in pure non-block mode, so just one thread
> in c#, and i used webbrowser, wget, telnet to perform this test
> too.

So you have a single thread managing multiple WS connections to
Tomcat? What I'm trying to determine is how many connections you are
actually opening. How many connections is the CLR willing to open to a
single WS endpoint?

> It's very strange that it wont happen when the tomcat run in 
> localhost, this problem exist only between different machines. and
> I had write a simple echo server for compare, the echo server can 
> accept many connection as expected.
> 
> now i run tomcat in embed mode, hope i can find out what
> happened...

I wonder if this is something the CLR is doing to you. Can you
instrument the client as well as the server?

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVktklAAoJEBzwKT+lPKRYs1cQAJ9xWApemBJHwhMoMHfuoQMQ
DMj6cQDrvrgo3Ahq4LKlhnhc/Sszjp4wpBcpBBD8ZfkTwArn3aE07ZPPjmY/3epF
EZS0aezKMPCsSngCBYj1qMEbSwTwMFdD7ofC9OW1E7z31wOfuZ2G8/XXjWdis19R
wtXyrMLZf1ZBTmdUvDR6wugbNqOqvVHkhvubgIdjK6uzbBhYrX3c+Dm6f3tIUMOq
oNMzBaeCQcILqibm9hkFK4gpIEDNI3R2EqippDu1bMcuJImNPi5vzlT0KbpzJIH4
sKubU322QIReqcG/4R+wCfNAIC0JM7fZKEj8rJonYLlvDd7KdhoPFD3xOs2uNZrw
zeksSFWJmTFuRYwGzP+X4vmXIekcRu3Wdls+lPUvy8sZKqnRJp7Wr9SN97V/7gHC
AatxKsDLsI5NvS8C1TeYqLc52Umby3ivJbzSR9T2WWy30UcoWFhYMwu1dftkgra5
rJNOgw2Ke95XQHCR1mlcZyD00l8ZzpIAU7jirTq1gSYj94t+GzGjTcN1a7GV/r2d
v8pwDNAgJbeEzMBtxFsHsZOFM4GJbX/Qx+i/j6/f6zvWCEwUmMd7mNl4/SZ/aHlm
XiaVSrXdVUDzMZqGQX9Lzsgf1SHurGCMy2J5uGijMiR3FpuzcjPoD1u5/DrGo02d
qRdyDzdNdCeygcOQbCDS
=Wmnl
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org

回复: 回复: 回复: why only 2 requests for async request can raise from a end-point?

Posted by 许明 <hs...@qq.com>.
Hi Christopher,


after your advise, i recheck all arround, and it's really raise from the c# test program.  :(


there is a bug in WebRequest, i dont know what happend in this class, since requesting to localhost is ok. and if pure Socket, or WebClient.DownloadStringAsync wont meet this bug. if not your firm advice, i will never doubt about this.




Best Regards


------------------ 原始邮件 ------------------
发件人: "Christopher Schultz";<ch...@christopherschultz.net>;
发送时间: 2015年7月1日(星期三) 凌晨2:00
收件人: "Tomcat Users List"<us...@tomcat.apache.org>; 

主题: Re: 回复: 回复: why only 2 requests for async request can raise from a end-point?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

许明,

On 6/30/15 1:22 PM, 许明 wrote:
> yes, i connect tomcat directly, port is 8080.
> 
> I wrote the test tool in pure non-block mode, so just one thread
> in c#, and i used webbrowser, wget, telnet to perform this test
> too.

So you have a single thread managing multiple WS connections to
Tomcat? What I'm trying to determine is how many connections you are
actually opening. How many connections is the CLR willing to open to a
single WS endpoint?

> It's very strange that it wont happen when the tomcat run in 
> localhost, this problem exist only between different machines. and
> I had write a simple echo server for compare, the echo server can 
> accept many connection as expected.
> 
> now i run tomcat in embed mode, hope i can find out what
> happened...

I wonder if this is something the CLR is doing to you. Can you
instrument the client as well as the server?

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVktklAAoJEBzwKT+lPKRYs1cQAJ9xWApemBJHwhMoMHfuoQMQ
DMj6cQDrvrgo3Ahq4LKlhnhc/Sszjp4wpBcpBBD8ZfkTwArn3aE07ZPPjmY/3epF
EZS0aezKMPCsSngCBYj1qMEbSwTwMFdD7ofC9OW1E7z31wOfuZ2G8/XXjWdis19R
wtXyrMLZf1ZBTmdUvDR6wugbNqOqvVHkhvubgIdjK6uzbBhYrX3c+Dm6f3tIUMOq
oNMzBaeCQcILqibm9hkFK4gpIEDNI3R2EqippDu1bMcuJImNPi5vzlT0KbpzJIH4
sKubU322QIReqcG/4R+wCfNAIC0JM7fZKEj8rJonYLlvDd7KdhoPFD3xOs2uNZrw
zeksSFWJmTFuRYwGzP+X4vmXIekcRu3Wdls+lPUvy8sZKqnRJp7Wr9SN97V/7gHC
AatxKsDLsI5NvS8C1TeYqLc52Umby3ivJbzSR9T2WWy30UcoWFhYMwu1dftkgra5
rJNOgw2Ke95XQHCR1mlcZyD00l8ZzpIAU7jirTq1gSYj94t+GzGjTcN1a7GV/r2d
v8pwDNAgJbeEzMBtxFsHsZOFM4GJbX/Qx+i/j6/f6zvWCEwUmMd7mNl4/SZ/aHlm
XiaVSrXdVUDzMZqGQX9Lzsgf1SHurGCMy2J5uGijMiR3FpuzcjPoD1u5/DrGo02d
qRdyDzdNdCeygcOQbCDS
=Wmnl
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org

Re: 回复: 回复: why only 2 requests for async request can raise from a end-point?

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

许明,

On 6/30/15 1:22 PM, 许明 wrote:
> yes, i connect tomcat directly, port is 8080.
> 
> I wrote the test tool in pure non-block mode, so just one thread
> in c#, and i used webbrowser, wget, telnet to perform this test
> too.

So you have a single thread managing multiple WS connections to
Tomcat? What I'm trying to determine is how many connections you are
actually opening. How many connections is the CLR willing to open to a
single WS endpoint?

> It's very strange that it wont happen when the tomcat run in 
> localhost, this problem exist only between different machines. and
> I had write a simple echo server for compare, the echo server can 
> accept many connection as expected.
> 
> now i run tomcat in embed mode, hope i can find out what
> happened...

I wonder if this is something the CLR is doing to you. Can you
instrument the client as well as the server?

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVktklAAoJEBzwKT+lPKRYs1cQAJ9xWApemBJHwhMoMHfuoQMQ
DMj6cQDrvrgo3Ahq4LKlhnhc/Sszjp4wpBcpBBD8ZfkTwArn3aE07ZPPjmY/3epF
EZS0aezKMPCsSngCBYj1qMEbSwTwMFdD7ofC9OW1E7z31wOfuZ2G8/XXjWdis19R
wtXyrMLZf1ZBTmdUvDR6wugbNqOqvVHkhvubgIdjK6uzbBhYrX3c+Dm6f3tIUMOq
oNMzBaeCQcILqibm9hkFK4gpIEDNI3R2EqippDu1bMcuJImNPi5vzlT0KbpzJIH4
sKubU322QIReqcG/4R+wCfNAIC0JM7fZKEj8rJonYLlvDd7KdhoPFD3xOs2uNZrw
zeksSFWJmTFuRYwGzP+X4vmXIekcRu3Wdls+lPUvy8sZKqnRJp7Wr9SN97V/7gHC
AatxKsDLsI5NvS8C1TeYqLc52Umby3ivJbzSR9T2WWy30UcoWFhYMwu1dftkgra5
rJNOgw2Ke95XQHCR1mlcZyD00l8ZzpIAU7jirTq1gSYj94t+GzGjTcN1a7GV/r2d
v8pwDNAgJbeEzMBtxFsHsZOFM4GJbX/Qx+i/j6/f6zvWCEwUmMd7mNl4/SZ/aHlm
XiaVSrXdVUDzMZqGQX9Lzsgf1SHurGCMy2J5uGijMiR3FpuzcjPoD1u5/DrGo02d
qRdyDzdNdCeygcOQbCDS
=Wmnl
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org