On 10/23/2012 1:12 PM, Daniel Barcellos wrote:
Hi Chris,

you've said: "I think that you are trying to use this list incorrectly...".

Thank you for your patience in advising me how should I use this list. I'm
pretty sure you're right, but if I'm here that's because I'm not able to
find any good solution in the google's ocean.

I was wondering if based on your experience that is possible to setup my
enviroment since I was already faced some issues due to miss configuration
or even because my server just got hanged by consuming all it thread and so
on.

Hi Christopher,

It's a chart solution that uses Primefaces componenet suit.

I was wondering that based in the fact that this app will have to handle
100 users over it. And I was wondering that since i'm not sure about the
hardware I have on the client side, I'd like to know
if there's a good setup like how many virtual memory do I need to use, how
many threads do I need to set... stuffs like that.

I'm pretty sure that someone on this list already faced some kind of
scenario and might share his knoledge...

Imagine this simple examplo... we used to develop app for Oracle forms that
runs over a oracle application server. If you need to install it you should
obey a big list of requirement
so that every thing under its control will run ok.
Now we need to use and deploy software over Tomcat that is basically a free
server. Where can I find those requirements? I'm not able to find them on
google because there's a lot of
specif case documents and posts...

Cheers,


2012/10/23 chris derham <ch...@derham.me.uk>

Today we're about to deploy a simple app that is basically a charts
solution that will run over Tomcat 7.X. Well till there everything is all
right. But since I'm not a heavy user of Tomcat I'm not so sure what
could
that be the best settup for my app for not have problems in a first sight
by a miss configuration.

This app will have 100 concurrent users and in terms of hardware I'm not
sure what they will give us.

Is that possible that you guys share some experience and minimal setup
due
to those above scenario?

Thanks!!!

Daniel,

I think that you are trying to use this list incorrectly. If everyone
that wanted to use tomcat emailed the list, none of the people who
answer questions on the list would be able to get any work done. They
are only answering the questions posted on this list in their own free
time. Nobody is paid to answer questions on this list.

The suggested approach to using tomcat (and open source software in
general) is

1) download, install, try it out
2) if you get an error, google for the error message. 99.99% of the
time, somebody else will have hit the problem and commented about it
somewhere
3) if you can't fix it by yourself, ask the list

You seem to be asking "for this piece of software (that I won't tell
you anything about), how should I configure tomcat?" Nobody can answer
that question. We don't know the software - you haven't told us. We
don't know the hardware. We don't know the load.

Even if people did know the above, the answer is always to try your
suggested load using your hardware, and see what happens. The defaults
generally work very well in a broad range of situations. That's why
they are the defaults. Perhaps you will need to tweak some settings,
but you need to have a baseline, and method to test what effect each
change actually has.

HTH

Chris

As many others have said, there is no magic bullet.

OK,

So now we know that you're running a Primefaces application (JSF widget set) on Tomcat 7.x.

We don't know if you're using JSF 1.1 or JSF 2 (and the corresponding version of Primefaces).

We don't know if you're using CDI with your Primefaces application (and if so, then you are using JSF 2).

If you are using CDI, then you'll need to include both the JBoss Weld Servlet (or something similar) and an appropriate configuration in context.xml and web.xml.

I use Maven to build most of my applications these days, so here are the snippets I use for JSF 2 with CDI on Tomcat 7.

<!-- pom.xml dependency -->
<dependency>
    <groupId>org.jboss.weld.servlet</groupId>
    <artifactId>weld-servlet</artifactId>
    <version>1.1.9.Final</version>
</dependency>

<!-- Resource in context.xml in META-INF -->
<Resource name="BeanManager"
          auth="Container"
          type="javax.enterprise.inject.spi.BeanManager"
          factory="org.jboss.weld.resources.ManagerObjectFactory"/>

<!-- listener in web.xml -->
<listener>
    <description>CDI listener</description>
    <listener-class>
        org.jboss.weld.environment.servlet.Listener
    </listener-class>
</listener>

Tomcat 7 is a servlet container and is not required to provide CDI as per the specifications.

Now, we get to resource usage of your application.

In my limited experience, I've found that JSF / Primefaces is a bit heavier than just plain MVC style applications. Memory (heap, perm-gen) may need to be increased.

Then again, it may not need to be increased.

The only way to know is to test your application. Set up a stock Tomcat (no changes to the default configuration), and then test. Since Primefaces can make heavy use of AJAX, a good testing platform is probably Selenium.

First, depending on your platform, you may need to increase heap size.

Second, depending on the number of classes you use, you may need to increase permgen size.

Once a tool like JConsole or VisualVM shows a stable memory pattern, then it's time to tune Connectors.

Look at the comparison of connectors found at:

http://tomcat.apache.org/tomcat-7.0-doc/config/http.html#Connector_Comparison

Pick one that matches your use case. I usually end up with APR/native, but you may find that the NIO connector better suits your use case.

Again, there is no magic configuration for an application. The defaults supplied with Tomcat 7 provide a good start, but only testing will tell you what's appropriate for your particular application.

. . . . just my two cents
/mde/


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

Reply via email to