Hi Reich, Lloyd, Chris,
Finally the issue is resolved by enabling APR feature in tomcat. Now
the NM can use 40 concurrent threads to talk with 100 simulated
devices with 70s delay on each successfully.
But I am not very clear yet why I have to use APR instead of NIO
connector in the scenario :)
on a Linux box, you should
consider this:
http://www.mail-archive.com/users@tomcat.apache.org/msg36968.html
-- Matthias
-Original Message-
From: Wang Han [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 24, 2008 11:25 AM
To: Tomcat Users List
Subject: Re: Can we slow down the speed of servlet
Hi Chris,
Just received the latest version NM software and it works well with
Thread.sleep works now.
It seems old NM SW bug caused Thread.sleep() failed.
the latest NM will send 60 concurrent requests maximum and I
configured the Connector element as:
Connector
Han,
I think you're barking up the wrong tree here--use a Mock Object (a
dummy) to stub out your app so it thinks it's calling the Servlet.
After you've tested your app working, then revert to actually sending
the request to Tomcat.
If the Servlet provides real data that must come from
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Lloyd,
DIGLLOYD INC wrote:
| I think you're barking up the wrong tree here--use a Mock Object (a
| dummy) to stub out your app so it thinks it's calling the Servlet.
| After you've tested your app working, then revert to actually sending
| the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Han,
Wang Han wrote:
| I have tried Thread.sleep() in my servlet and it fails.
| My NM app throws exception and can't handle such response..
What exception is thrown? I can't see a reason why Thread.sleep wouldn't
work.
- -chris
-BEGIN PGP
From: Wang Han [mailto:[EMAIL PROTECTED]
the app sends some request to servlet and will handle the response
after 5 minutes.
But in the servlet side, it handles the request too fast and always
sends response back to app in 30 seconds.
So I wonder is there a way to add some delay in tomcat
To start with, I'd take the naive approach and see whether it worked
well enough for the job. I'd use thread.sleep(), and make sure I had
enough worker threads (configured in server/conf.xml) to handle the
number of outstanding requests you want to generate. That could be
many thousands (I
Hi all,
Thanks for your interesting suggestion.
I have tried Thread.sleep() in my servlet and it fails.
My NM app throws exception and can't handle such response..
Will try he other 2 method and see what will happen.
B.R
Hanks
On Thu, Apr 17, 2008 at 3:18 PM, Benjamin Lerman [EMAIL PROTECTED]
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Han,
Wang Han wrote:
| But in the servlet side, it handles the request too fast and always
| sends response back to app in 30 seconds.
Maybe you should get together with the guys who are always asking about
how to optimize Tomcat and get their code
10 matches
Mail list logo