tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Asankha C. Perera" <asan...@apache.org>
Subject Re: Handling requests when under load - ACCEPT and RST vs non-ACCEPT
Date Wed, 07 Nov 2012 03:25:18 GMT
Hi Esmond
> That wouldn't have any different effect to not calling accept() at all in
> blocking mode
Clearly there is a difference. Please see the samples in [1] & [2] and 
execute them to see this. The TestAccept1 below allows one to open more 
than one connection at a time, even when only one accept() call is made 
as has been explained in [1]

import java.net.ServerSocket;
import java.net.Socket;

public class TestAccept1 {

     public static void main(String[] args) throws Exception {
         ServerSocket serverSocket = new ServerSocket(8280, 0);
         Socket socket = serverSocket.accept();
         Thread.sleep(3000000); // do nothing
     }
}

[1] 
http://esbmagic.blogspot.com/2012/10/does-tomcat-bite-more-than-it-can-chew.html
[2] 
http://esbmagic.blogspot.com/2012/11/how-to-stop-biting-when-you-cant-chew.html

regards
asankha

-- 
Asankha C. Perera
AdroitLogic, http://adroitlogic.org

http://esbmagic.blogspot.com




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message