Connection timeout depending on how many client JVMs (but as many requests)

Hello,
sorry for the cryptic title, I hit the length limit.
Here is my problem. I'm asking first for an explanation, or for ways to investigate it. Afterwards I'll need a solution but as I suspect the problem is involved, and involves several tiers, I will probably open dedicated topics instead.
Short Story*: a web service server and 10 test client JVMs work fine - but a single test client simulating 10 virtual users experiences ConnectException.
What can I log or probe to understand why?
Long Story*:
I have an application that I used to simulate load on a WebService server. The app simulates a variable number of clients of these WebServices, each virtual client running in its own thread, and sequentially calling the same set of WebServices in a fixed order, and looping.
I have, on some occasions, met various problems with the server product (under development and validation), or the test client (that may not have had the same level of attention and quality in the design as the product), some of you may remember some of my asking here and there. But we achieved a fair level of reliability.
However, today, after a few weeks' change to the server(1), we load-tested it using the test client simulating 10 concurrent clients. After a few minutes, we repeatedly witnessed a fair number (1% of the requests) of java.net.ConnectException "connection timed out" raised at the client's end. I immediately suspected the server to not honor connection requests timely, and went on monitoring the server's queues, listeners,etc.
As nothing seemed to highlight a problem on this side, a colleague suggested that we instead launch 10 client JVMs (on the same single test client machine), each one simulating one single client. I blatantly qualified his suggestion of "hopeless random try" but let him try his way.
Dang! He repeatedly demonstrated that the 10 client JVMs do not undergo the ConnectException, even though they simulate the same number of concurrent requests (well, 10 at most), at the same thoughput - and we observe the same level of server CPU, and same functional results.
I respectfully apologized for being a pretentious moron (2), but he hasn't proposed any satisfactory explanation so far, and I'm clueless too. So we haven't been able to make the "single JVM load-test client" work. We need to make this one work, for various reasons.
There may be some server-side tweaks (worker thread pools, waiting queues,... for the record it's a Glassfish server) that I may tune, but as the "regular" situation of 10 client VMs is handled appropriately, I deem the server-side setting are correct.
So I'm primarily interested in monitoring the client host and JVM(s) to spot the differences between the two scenarios. But there may be some server-side indicators as well (queue size, keep-alive pool) that may help the investigations - and if need be, I will happily tune the server for the benefit of the "test client investigating".
One track I'd like to investigate, is the way HTTP connections are reused: we're using a JAX-WS client querying a Glassfish server, and both seem to agree on using HTTP1.1 (I checked HTTP packets with tcpmon), which supposedly "reuses connections" (is that the same as "keeps TCP socket open and reuses them"?). Could it be that the 10 threads in the multi-client simulator have a bottleneck of using a shared HTTP connection(s)? I don't know how to log or monitor this:
- I did a couple of netstat dumps during the tests on the (Windows) client test machine, and it exhibits only a few hundreds of sockets in TIME_WAIT state, and a few dozens of ESTABLISHED ones.
- I don't have the numbers for the server, though.
I don't know how to investigate that further. Any clues?
I may exhibit a poor turnaround time in this thread, as the test platform is used for real tests, but I do care about the topic, so I attach shiny little dukes.
Thank you for your time (well if you've read this to the end you at least deserve a thanks!) (3)
J.
(1) and after switching test platform (room & network); lesson one: "Never mix test platform changes and other changes in the same iteration; regression-test the new test platform with the former software version"
(2) lesson two: "When you don't know, don't tell a colleague he doesn't know"
(3) lesson three: "Short posts get better attention, are better understood, and more happily replied to"... (sigh)

Hello ejp,
I not only missed your points, but missed your latest post as well :o)
I'm discovering it.
You've missed the point. Problems that only shows up with multiple clients in the same JVM but not with multiple JVMs don't correspond to real-world situations any more than the configuration does so there is little in even investigating them, and no point whatsoever in trying to fix them.
(...) It's not 'hopeless', but you have to be constantly aware that it can lead to false positives and false negatives.Fixing them woud enable me to continue load tests with a cheaper test platform. I cannot afford 10, 100 or 1000 client machines. I know you're talking about JVMs, but 10 or 100 client JVMs running on a single host is not a real-world situation either, no more than "all clients are on the same LAN". I have to do away with approximations, keeping aware as completely as possible of the differences it introduces.
This is not true for HTTP connection caching: this favors the server as much as the client, so I can't infer that it's a favorable case overall.Again you've missed the point. It can only happen inside a single JVM. So it may present you with false positives.I'm still not sure I got the point now:
-> For the server, wich are the differences between both client configurations (single-JVM vs 10 JVMs)?
- - Does a new TCP connection request from the same JVM involve less work if one is already established?
If not, and if each virtual client uses its own TCP connection, there is no cheating, and I don't need to worry about this level of bias.
- - Does an HTTP request that comes over an established TCP socket require less server work than an HTTP request that reqests a new TCP socket?
Probably (in the second case the server has to accept the TCP request and probably pool it, and assign a reader thread, etc...). So I do need to worry about this bias. One way to avoid it is to manage to have the virtual clients not using each other's HTTP connection.
And so on...
Is it possible to build a comprehensive list of the differences incurred by the single-JVM configuration?
Then for each of them, I can try to evaluate ways to alleviate the bias.
- If I managed to avoid or alleviate each and every bias, I would be back to a realistic simulation.
- If there remained only the biases that handicap the server (such as, the server crashes under a 15 clients load, whereas in reality it could sustain 25), then I could be conservative and announce "the server will handle 15 clients gracefully" to the salespeople that will establish the SLAs. I understand that I may never be able to prove that the server actually scales up to 25 concurrent clients, but as long as the conservative SLA matches the market target that will do.
- If I'm left with biases that do favor the server, then I can't rely on the test platform and I'll reluctantly but resignedly try to have a more realistic platform funded (the more likely outcome is to be asked to provide probabilities and disclaimers in the test reports).
Thanks for your help so far, and please bear with my stubborn but polite request to try to identify further the differences ad causes.
J.
Edited by: jduprez on Dec 14, 2009 5:56 PM
Edited by: jduprez on Dec 14, 2009 5:57 PM

Similar Messages

  • What is a connection timeout? And how do I stop it?

    Hi all,
    I've recently bought a mac and I don't know what happening but now and then when I try and connect to the net it immediately pops up with "connection timeout" I have no idea why this is happening. I made a few changes to my mac (for example I put on a screen saver and password) and now my internet isn't connecting. It works when I use my iphone as a hotspot but I'm not paying for home connection so that I can use my phone as a modem.
    I searched a few forums and this seems to be a massive problem with mac users. What is this all about about? What causes it and more importantly what stops it?
    Thanks,
    Jay

    You're not in the right room to discuss this kind of issue. Anyhow, this message is simply telling you that your internet connection isn't working correctly or isn't configured correctly. Nothing more, nothing less. I would call your ISP's customer service to get it working again.

  • OID Firewall / Data Connection Timeouts

    Hello
    I have an OID cluster (11.1.0.5) setup within our environment and have a firewall installed between the OID servers and the database servers.  The defualt connection timeout for the DB connection was increased to three hours, but after three hours I keep getting the periodic failures of OID / enterprise manager.  I have set the idle connection timeout and retries in the OID configuration, but this still seems to occur even with the timeouts / retries configured.  Is there a max session length or some other way to tell OID to close db connections after a period of time so that the max session is not reached?
    Also, if I am just querying OID with a script, it seems to work past the three hours but I think this is more of a cache thing whereby it is responding with cached entries.  When I go to enterprise manager and try to manage OID, I will get the failure after the timeout with a LDAP error code 49 error and need to submit a bunch of requests to OID to refresh the connection to the database.
    Any help you can give would be appreciated.
    Thanks
    Nick

    Alex,
    Thanks for the prompt reply.
    Not having Maximum times in ODP will make things complicated and a myriad of race conditions can occur.
    There is an involved example of a Transaction Timeout Cancel that I could implements with a an application Maximum timer on page 5-27 of the Oracle Data Provider for .NET Developer's Guide and it is not easy to implement
    However, it is not described anywhere on how to implement a Maximum Connection Timeout.
    In the example below from the docs the application will block at the Open() call:
    // Connect
    string constr = "User Id=scott;Password=tiger;Data Source=oracle";
    OracleConnection con = new OracleConnection(constr);
    con.Open();
    So do we do the following:
    // Connect
    string constr = "User Id=scott;Password=tiger;Data Source=oracle";
    OracleConnection con = new OracleConnection(constr);
    *//Set_Application Timer*
    con.Open();
    OnApplicationTimer()
    con.Close()
    //Do application timeout processing
    What will the Close() do for us here? What will happen if the Connection open is still in progress when we try to close it?
    Should we forget attempting to Close() and wait until Oracle decides to return in the first method as shown below?
    OnApplicationTimer()
    //Do application timeout processing but don't explicitly send Close()
    // Connect
    string constr = "User Id=scott;Password=tiger;Data Source=oracle";
    OracleConnection con = new OracleConnection(constr);
    *//Set_Application Timer*
    con.Open();
    //Eventually it will timeout. If succesful, clo0se immediatly since it is too lpate.
    Nathan

  • Wifi connectivity timeout

    Hi All,
    I have mac book Air 2012 with following OS
    OS X 10.8.2 (12C3006)
    Recently My Wifi connection droped time to time at Office. But now i can not connect to Wifi at all.Its giving connection timeout issue most of the time. But my home wifi connection working fine.
    Others can connect to wifi without any issue at Office. But they are using other Brands not Apple.
    Please help me to solve this issue.

    @semperfiguy:  Do trial and error.  Your functions are utilized as widgets.  I have many home-made and borrowed functions and have no problem.  First, test your settings with the default rc.lua and tell us if something is still wrong.  Are all your modules up to date?  Nvidia drivers/kernel? (Sorry but NOT everybody does this .
    Also, what kind of machine/arch (32-bit/64-bit) are you running?  I use 64 bit amd with 64 bit archlinux and an nvidia card.
    Lastly, if it's not any trouble, try trial and error on widgets and notifications, using lua comments to comment your widgets out and keep adding them back.  I suggest you change your volume hook for example.  Your hooks load rather quickly.  I would do Gmail notification every 5 minutes or so and my volume hook updates every 10 seconds but getVol is displayed as soon as I mouse over to change the volume.  Instead,  If you are using a tray, you can replace naughty notification with Noteo, highly recommended.  I do not suggest checking gpu temp so often with nvidia-settings.  Do you have powermizer and thermal monitor on in nvidia-settings?
    Use lua style comments to comment all custom widgets out then gradually add them again, noticing any difference while we look over your rc.lua/functions.lua.  Also, load the same background processes and try using a different WM to see if the same thing occurs.  Hope to hear back.  I don't see anything wrong in functions.lua.

  • IMac G5 Connection Timeout

    Help!
    I'm trying to troubleshoot my Mom's computer - it's an iMac G5 (Power PC) running OSX 10.5.8.  Up until a few days ago it was connecting wirelessly to the internet just fine.  Then it gave her a "not connected message" every time she tried to open Safari.  It still connects to the internet fine with an ethernet cord plugged in, and it's picking up the wireless network, but when I try to select it it gives me a message saying "connection timeout".  I tried updating system software, but that didn't help any.  Can anyone give me advice on this?  Thanks.

    Make a New Location, Using network locations in Mac OS X ...
    http://support.apple.com/kb/HT2712
    Is that Interface dragged to the top of Network>Show:>Network Port Configurations and checked ON?
    The Interface that connects to the Internet, needs to be drug to the top of System Preferences>Network>Show:>Network Port Configurations and checked ON.
    10.5.x/10.6.x instructions...
    System Preferences>Network, click on the little gear at the bottom next to the + & - icons, (unlock lock first if locked), choose Set Service Order.
    The interface that connects to the Internet should be dragged to the top of the list.

  • How many clients can be connected to an Access Point

    Hi friend,
    I want to know how many clients can be connected in Cisco AP 1140.
    Best Regard,
    Marco.

    Hi,
    As Stephen mention the best answer is it depends.
    What you need to keep in mind is that wireless is halfduplex and a shared medium and due to this the bandwith will go down per client.
    http://www.cisco.com/en/US/products/hw/wireless/ps430/products_qanda_item09186a008009483e.shtml
    Q. How many clients can associate to the AP?
    A. The AP has the physical capacity to handle 2048 MAC  addresses, but, because the AP is a shared medium and acts as a wireless  hub, the performance of each user decreases as the number of users  increases on an individual AP. Ideally, not more than 24 clients can  associate with the AP because the throughput of the AP is reduced with  each client that associates to the AP.

  • How many client connections will iMQ 2.0 handle?

    My main concern is what the number of concurrent client connections (in a single instance) iMQ
    can handle? This also depends on Hardware/Software configuration, JVM version (if it pure Java implementation), etc. But it also depends on Vendor implementation. For example FioranoMQ claims that can handling more than 5K concurrent client connections in a single instance of the FioranoMQ server without leading to any substantial performance degradation when a low number
    of clients are connected to the server.

    With proper tunning iMQ 2.0 can handle thousands of simultaneous connections.
    For example on a modest Sun system (Sun Ultra 60/2300 (2x300MHz) 512MB ram)
    We have run 4000 active connections without a problem. With more memory the
    system could have supported more.
    The iMQ FAQ gives some tuning guidelines for configuring the iMQ server
    (the broker) to handle large number of connections. I'm attaching the
    relevant excerpt (the online FAQ is a bit out of date).
    When I try to connect more than 500 clients to the Broker's JMS service, performance gets really poor. Is there a way to configure the
    Broker to handle more connections with better performance?
    Yes. By default the JMS service's thread pool is limited to 1000 threads. The Broker runs best when it can allocate two threads per
    connection. Once the thread pool limit is reached, threads are shared and performance decreases.
    The solution is to:
    1.Increase the thread pool limit for the JMS service so threads are not shared.
    2.Configure the broker's socket read timeout so read threads fully block.
    3.Configure the JVM to improve performance in highly threaded applications.
    4.And if you are running on Solaris and plan on going over ~1000 connections you will also need to:
    Increase the maximum number of open file descriptors per process.
    Step 1: Increase thread pool limit for JMS service
    Set the jmq.jms.max_threads property to be 2X the maximum number of connections you wish to support. For example if you want to
    support 1000 connections you will need to set the property to 2000. You can do this by adding the following line to
    $JMQ_VARHOME/stores/<broker instance name>/props/config.properties:
    jmq.jms.max_threads=2000
    Or by running jmqcmd:
    jmqcmd update svc -n jms -o maxThreads=2000
    Step 2: Configure the broker's socket read timeout
    Set the jmq.protocol.timeout to 0 to cause read threads to fully block in read. Do this by adding the following line to
    $JMQ_VARHOME/stores/<broker instance name>/props/config.properties :
    jmq.protocol.timeout=0
    Step 3: On Solaris pass additional parameters to the JVM
    If you are running the broker on Solaris you should pass the following parameters to the JVM:
    -Xss128k -Xconcurrentio
    The first parameter reduces the per-thread stack size to 128k. The second adjusts several internal JVM parameters that significantly improves performance of highly concurrent applications.
    You may pass these to the broker by using the -vmargs option to the broker command or you may choose to alter the $JMQ_HOME/bin/jmqbroker script by adding "-Xss128k -Xconcurrentio" to the line that starts with with "def_jvm_args". For example you would end up with a line that looks like:
    def_jvm_args="-Xms8m -Xmx128m -Xss128k -Xconcurrentio"
    Note that if your system has sufficient RAM you may also want to increase the JVM max heap size parameter (-Xmx128m).
    Step 4: On Solaris Increase the maximum number of open file descriptors per process
    This is covered in the iMQ 2.0 documentation. One way to do this is to run 'ulimit -n unlimited' in the shell you are going to run the broker in.

  • How many clients can connect through cisco AP 1310 in wireless network ?

    I had setup wireless network with
    wlc4402,cisco AP 1310.1131 and 1242 and Cisco acs 4.1.My problem is only 30 clients connect through Cisco AP 1310 at a time.I can not connect more than 30 clients at a time.What is the issue in wireless network?please reply .
    Thanks and regards
    By
    D.Anbudurai

    WIRELESS > 802.11 > RRM
    How can do that setting ? Can you reply with
    some brief steps? And also I want to know how
    many clients can connect in wireless network at
    a time exactly through cisco aps?
    Thanks and regards
    d.anbudurai

  • Can I find out how many clients are connected to a server process?

    Hi, I am hoping I can find out how many clients are connected to a server process. This could be either a programmatic lookout number, a number in a log file etc.
    By the way, does lookout have any application (not data) logs? I have noticed that occasionally lookout will crash and I cannot find any logs to determine why, what processes were running, who last accessed it etc.
    Thanks

    Hello,
    There's currently no way to acquire this data. I think that'd be a great suggestion for the product. Please submit your feedback to our developers at the following link: http://digital.ni.com/applications/psc.nsf/default?OpenForm&temp1=&node=
    Best regards,
    Yusuf C
    Application Engineer
    National Instruments

  • How many clients can connect to Topic?

    I've just read through the jms tutorial and it seems to be ment to losely couple parts of a big systems. (delivery -> factory -> order)
    I'm in the process of beginning a application which has the following structure:
    One client sends a message to the server, the server sends this message to one or more clients. (in jms: sender sends message to topic, topic sends message to receiver).
    Now the client which receive the message from the server isn't part of a system, it's actual a person who sits behind his/her computer and finds the messages interesting.
    My question is about how many clients can "watch" the topic for messages? Are we talking about 50, 100, 500 or 1000 or maybe 10.000 ?

    Jan,
    I do not think that there is a forced limit for as long as your hardware can sustain.
    It also probably depends from MQ vendor to vendor, and their JMS implementations.
    In one of my apps 10,000 subscribers was the practical celing due to the memory limitations. (On Solaris 8, 2 GB shared memory)
    In another that used open source JMS celing was much lower. due to its underlying EJB implementation (Linux).
    I would suggest a clean box test. Benchmarking, stress and load testing you middleware is always a good idea. It will give you a good idea what your app can and can not do.

  • Monitor how many client is connected

    How can I monitor how many clients is connected to my statefull controller bean? I want to used it as a part of my license application.
    I have tried to make a static variable "clients" which increase when ejbcreate is called and decrease when ejbremove is called. But this solution is not realible? Any other solution?

    Hi...why dont you keep a counter in the class / java bean which calls this stateful controller bean ? That way each hit would be registered and you wont be relying on instance creations for an actual count.
    Just a thought.

  • How many clients can connect to AP54G?

    Pls let me know how many clients can connect to AP54G?
    I find in it's spec, but can't find.
    Thanks!!!

    no answer...
    any in my question wrong?
    Please..................

  • How many client session at max can a JCO connection support for webdynpro

    Hi Everybody,
    We have a Java Webdynpro Dc application with ARFC model, it will be accessed by some hundreds of people. So, How to know whether this application wil support that many client sessions. And where to configure the jco's to suppport that many number of client sessions.
    Thanks & Regards,
    Ravi

    Hi Ravi,
    Just check this reply similar to your prob:
    If you are using Windows. Then you can right click on the properties of My Computer and select properties. Go to advanced Tab-->Environment Variables and then add this CPIC_MAX_CONV paramter. Restart portal after this.
    set CPIC_MAX_CONV=500
    Further Look at SAP note 314530,316877
    regards,

  • How many clients can associate to the AP?

    Hi
    I need know how many clients can associate for this AP model
    AIR-CAP3502I-A-K9
    AIR-LAP1131G-A-K9
    I have 45 clients currently associated with each AP.
    Thanks

    I need know how many clients can associate for this AP model
    Theoretically, you can have 1098 clients per WAP.  However, in practice, this will depend entirely on the type of Wi-Fi traffic being pushed around.
    Cisco recommends no more than 25 clients per WAP.  But if you are just pushing emails, HTML around then this number can go as high as 35 clients per WAP.  If you are pushing HD video, then the number goes down to around 8 clients per WAP.
    I have 45 clients currently associated with each AP.
    This is too much.  Even for a 1131.  Take note that, unlike the 3502, the 1131 only has FastEthernet data port.  So with 45 clients connected to the 1131, you may have some bottleneck.

  • Mac mini server how many clients serve same time

    mac mini server[lion server] how many clients serve same time, the web server, suppose only traffic the web server?
    macs/PCs with server OSs designed for work as normal, but more mainly for left on, connected and serve clients on the internet eg web server, mail server? T/F

    Thanks for your help. I actually forgot that I posted this and when I saw the email telling me you sent a repsonse I then did another search (using a different phrase) and I found this:
    https://discussions.apple.com/thread/4554036?start=0&tstart=0
    I think that is saying that I can do what I am asking.

Maybe you are looking for