Dear Leon

Let me answer your question by the number of the questions:
1. My threadpool settings: are you talking about the java threadpool or the
tomcat server setting for the thread pool. If this is tomcat, I am sorry I
think I set it to standard from installation. I did not change any tomcat
standard settings except for the -xmx and -xms stuff. As for java, the DB
thread pool is set for 200 connections at once.

What I meant by slows down is that user clicks on a simple form view
function that usually takes less dan a blink of an eye to open, now the
application just not responding. The browser just keep loading and the load
animation for IE keeps spinning, but does not return the appropriate
response page and sometimes it just died (blank). When I check the tomcat
logs nothing went wrong.

This happens if a user run one of the heavy duty app and someone else run
another app (even simple ones). Regarding multiple tomcat machine.... I am
trying to avoid it because I would have to rewrite the entire software or
get an QOS machine to disperse the weight.

2. For number 2, I did the warning for user to wait and not to close the
browser before it is finished. But, a lot of them just don't even bother to
read the warning and keep closing it. I was wondering if there is an API for
monitoring dead users out there. Or I can always create a new API to monitor
user activities by planting an applet on the user site that will keep
pinging to the server and if the ping died, that means the user closed the
browser. Is this wise? 

Or I can try to see The java Concurency thing that you mentioned below.

Thank you for your advice and sorry for my bad English.


-----Original Message-----
From: Leon Rosenberg [mailto:rosenberg.l...@googlemail.com] 
Sent: Thursday, April 08, 2010 5:31 PM
To: Tomcat Users List
Subject: Re: Tomcat scalability setting - need help please

Hello Rendra,

comments inline.

On Thu, Apr 8, 2010 at 11:00 AM, Cin Lung <cinl...@gmail.com> wrote:
> Dear All Dev
>
> Sorry if repost, I got an error from the mailing list server.
> Can anyone help me with my problem? I have two biggest problems as follow:
>
> 1. Multi Connection Problem:
> I have a web application that service to multiple users. Everytime the 
> users accessing the server reach 100 users at the same time, the 
> tomcat would slows down. I tried to set -xmx1024 and -xms1024, but it 
> did not have any impact at all.
> I tried to set the memory cache to 2048 and above, but the tomcat 
> won't start.

What are your threadpool settings? What exactly is 'slows down' If it stops
responding you are obviously running out of threads. If it just gets slower,
you should consider measuring the load on your machine and webapp.
Maybe you should consider scaling to multiple tomcats/machines.

> Is there any way to improve tomcat's performance. Will there be any 
> use of Java NIO Framework in tomcat? I mean apache has Mina, why not 
> combine with tomcat?

There are a lot of ways, but first you should identify your problem.

>
> 2. User cancellation problem
> Another thing that really bug me is that user would click on a web 
> application that perform a very extensive task. The user was not 
> patient and just close the browser accessing the app. This did not 
> make that particular job stop. In fact the job is still running until 
> finish and then it got no place to return the result since the user 
> closed the browser. As the result, my server is working really hard 
> and takes up all the resources available, and causes other users to lag.
>
> Is there any way to make that particular user task/thread stop working?

The common way to handle this is to inform user that the task is going to
last a bit more. To achieve this, the original request starts a background
job which executes the heavy task. The original request then sends the user
to a wait page, which explains that he/she has to wait for the execution.
The wait page reloads itself all 1-2 seconds checking whether the background
job has finished. If this happens, the wait page sends the user to the
result page, where he can examine the result of the background task.
There are a lot of classes like Executor, Future etc. which can help you in
synchronization of background jobs. Java Concurrency in Practice is a good
particular start.

regards
Leon








>
> Thank you in advance
> Rendra
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

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


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

Reply via email to