Re: Tomcat is slow with router configured

2007-12-19 Thread Gary Evesson
Try using the IP address in the driver specification rather than the name of
the machine. THat will tell you if it is a name resolution issue.

Gary.

On Dec 19, 2007 2:46 AM, Peter Crowther [EMAIL PROTECTED] wrote:

  From: Nabble-Member1 [mailto:[EMAIL PROTECTED]
  The web app is fast if I configured network bridge mode (both
  Web server and
  DB server have same subnet 192.168.1.x).  But it is very slow
  if the network
  is configured as router mode (Web server and DB server is in different
  subnets - 192.168.1.1 for web, 196.168.2.1 for DB, the 2
  boxes communicate
  via a router device).
 
  Is there settings in Tomcat to deal with this?

 No, and that's not a Tomcat issue.  That sounds like a Windows issue,
 probably to do with NetBIOS name resolution or authentication timing out.

 What happens if you exclude Tomcat from the problem by writing a little
 Java app that connects to the database using the same driver that you're
 using for Tomcat?  Is it still slow?  If so, Tomcat isn't the problem.

 What happens if you configure a WINS server on one of the machines (or
 another box elsewhere on your network) and ensure both have it as their
 primary WINS server?  Make sure both machines have actually registered with
 WINS, which can sometimes take a reboot, before you test.  Or you could try
 using LMHOSTS to fix the problem.

- Peter

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Gary Evesson


Re: Tomcat Clustering Support - Without any load balancer like component in the front

2007-11-27 Thread Gary Evesson
mod_jk handles failover for you.

Clustering tomcat makes it copy sessions to all members of the clusters so
that any member of the cluster can take over the processing of a request
seamlessly from any other. If you requests have no way of getting to the
other members of the cluster, then there is not much point in clustering.

You can use something like pen or a dedicated load balancer to handle
failover (and load balancing if you like) if you do not want to set up
apache.


On Nov 27, 2007 5:01 PM, mfs [EMAIL PROTECTED] wrote:


 Thanks for the quick reply Gary..

 Some follow-up questions.

 1) So the http server bundled with tomcat doesn't do any help ? like it
 doesnt provide any load-balancing implementation ? like e.g. mod-jk which
 has to be used in conjunction with apache...Further I presume mod-jk also
 handles the fail-over scenarios..

 2) When u say there is no huge amount of point, i wonder if there is any
 point AT ALL having that tomcat clustering enabled if we dont have
 something
 like a load-balancer/fail-over-service at the front?

 Thanks again

 Farhan.





 Gary Evesson-3 wrote:
 
  You need something to handle failover. Otherwise there is not a huge
  amount
  of point. Either a load balancer or mod-jk will do the job.
 
  On Nov 27, 2007 4:13 PM, mfs [EMAIL PROTECTED] wrote:
 
 
  Guys,
 
  Pretty basic question, given this is my time experience on clustering
  where
  i am trying to use tomcat 6 clustering support.
  So basically i wanted to know if enabling the tomcat 6 clustering would
  be
  of any use without having a load-balancer in the front (something like
  mod_jk) ? well my understanding so far is that we have to have some
  component in the front (which tomcat i assume doesn't provide...right
 ?)
  for
  either load-balancing or fail-over scenarios...
 
  Thanks in advance and REgards,
 
  Farhan.
 
 
  --
  View this message in context:
 
 http://www.nabble.com/Tomcat-Clustering-Support---Without-any-load-balancer-like-component-in-the-front-tf4885156.html#a13982315
  Sent from the Tomcat - User mailing list archive at Nabble.com.
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  --
  Gary Evesson
 
 

 --
 View this message in context:
 http://www.nabble.com/Tomcat-Clustering-Support---Without-any-load-balancer-like-component-in-the-front-tf4885156.html#a13982961
 Sent from the Tomcat - User mailing list archive at Nabble.com.


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Gary Evesson


Re: Tomcat implementation: please help

2007-11-26 Thread Gary Evesson
Try startup.bat.

On Nov 26, 2007 8:01 AM, Patrick2901 [EMAIL PROTECTED] wrote:


 Hi,
 i'm using Windows XP SP2.
 Thanks, Patrick

 mgainty wrote:
 
  Hello Patrick-
 
  Which Operating System are you using to implement Tomcat?
 
  M-
  - Original Message -
  From: Patrick2901 [EMAIL PROTECTED]
  To: users@tomcat.apache.org
  Sent: Monday, November 26, 2007 9:16 AM
  Subject: Tomcat implementation: please help
 
 
 
  Hi,
  i'm new to Tomcat, i've downloaded Tomcat (5.5.25 Windows Installer)
 and
  am
  trying to do the Head First Servlets  JSP- Book.
  In the book, it says that one can start Tomcat by entering
  %bin/startup.sh
  from the home directory (which is Tomcat 5.5). But in this directory,
  startup.sh does not exist. The way i got Tomcat running is by
  doubleclicking
  the file tomcat5w in the tomcat 5.5/bin/ directory. Do i miss
 anything?
  I need to know this as later in the book it says to shutdown by
 entering
  %bin/shutdown.sh, that isn't existing either.
  Thnaks, Patrick
  --
  View this message in context:
 
 http://www.nabble.com/Tomcat-implementation%3A-please-help-tf4875257.html#a1
  3949911
  Sent from the Tomcat - User mailing list archive at Nabble.com.
 
 
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Tomcat-implementation%3A-please-help-tf4875257.html#a13951367
 Sent from the Tomcat - User mailing list archive at Nabble.com.


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Gary Evesson


RE: Null

2007-06-29 Thread Gary Evesson
It's a classic! You should submit the conversation to
http://worsethanfailure.com/.

Gary Evesson
Decentrix Inc

-Original Message-
From: gb1071nx [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 29, 2007 12:13 PM
To: Tomcat Users List
Subject: RE: Null

Sigh. 

 -Original Message-
 From: domenico di leo [mailto:[EMAIL PROTECTED] 
 Sent: Friday, June 29, 2007 1:10 PM
 To: Tomcat Users List
 Subject: Re: Null
 
 Obviovusily you don't compare two string in this way!
 
  if (null == rs.getString(col_foo))
 
 The right manner is:
 
  if (rs.getString(col_foo).equals(null)){
 ..
 }
 
 Your problem is Java not database
 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



smime.p7s
Description: S/MIME cryptographic signature


RE: performance with apache and tomcat

2007-04-19 Thread Gary Evesson
Unless of course you need mod_rewrite. We also handle millions a day with
exactly this set up.

Gary Evesson
Decentrix Inc

-Original Message-
From: Leon Rosenberg [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 19, 2007 1:30 PM
To: Tomcat Users List
Subject: Re: performance with apache and tomcat

unless you explicitely need the httpd I wouldn't put it in front of
tomcat, since besides less performance and security issues (last one
like a month (?) ago with mod_jk) it doesn't bring you any benefits.
Without knowing your requests (duration, resources they consume etc)
its hard to make any estimations at all, but normally (whatever
normally is) and on fair hardware 40 requests a second are easily
served by one tomcat. So you could set up two machines with tomcats,
put the traffic on one of them and let your hw loadbalancer perform
the failover to the spare machine if needed.

regards
Leon

P.S. There are indeed some real scenarios, where a httpd in front
would be useful: down page, ssl, port 80 stress, but since you have a
loadbalancer, it will be serving it much better as httpd, so use your
lb features.

On 4/19/07, Eqbal [EMAIL PROTECTED] wrote:
 Hello,

 We are planning on using Tomcat as the Servlet
 container for one of our production systems. I would
 like to know if there are any performance issues using
 it together with Apache webserver 2.0 and the ajp
 connector (using mod_rewrite). Is performance expected
 to be better if we double up Tomcat as a webserver and
 not use apache at all.
 I heard an opinion that using apache with tomcat may
 mean worse performance?
 The site is a medium traffic site with about 800
 concurrent users, about 40 hits per second. We plan on
 using a hardware load balancer and we were not
 planning on putting the webserver outside the
 firewall, tomcat behind the firewall kind of
 configuration, so our webserver and app server are on
 the same hardware (Suse Linux). Original idea was to
 place static files on the webserver (apache 2.0) and
 servlets/jsps on Tomcat.
 I appreciate any feedback.
 Is this list searchable somewhere on the web? So I can
 search any pervious discussions on this topic?

 Thanks.

 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around
 http://mail.yahoo.com

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



smime.p7s
Description: S/MIME cryptographic signature


RE: performance with apache and tomcat

2007-04-19 Thread Gary Evesson
There are a few things that can get you:

Make sure you have sufficient threads available for the mod_jk connector on
the Apache side. Port 8009 by default. The default value is frighteningly
low and not up to any real load.

Make sure that the machine has enough memory. That is the biggest issue that
I encountered. As the number of connections mount, the amount of memory that
both tomcat and apache need escalates very quickly. Once you get into
swapping, you may as well pack up and go home. Tune the threads
configuration in apache and your VM parameters carefully to avoid memory
contention between apache and tomcat. My experience is that it is better to
reduce the number of concurrent connections you can handle to avoid
swapping.

Gary Evesson
Decentrix Inc


-Original Message-
From: Eqbal [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 19, 2007 2:27 PM
To: Tomcat Users List
Subject: RE: performance with apache and tomcat

We will need to use SSL. 
What causes any performance overhead in using apache
with Tomcat, considering they will be on the same
server?
--- Gary Evesson [EMAIL PROTECTED] wrote:

 Unless of course you need mod_rewrite. We also
 handle millions a day with
 exactly this set up.
 
 Gary Evesson
 Decentrix Inc
 
 -Original Message-
 From: Leon Rosenberg
 [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, April 19, 2007 1:30 PM
 To: Tomcat Users List
 Subject: Re: performance with apache and tomcat
 
 unless you explicitely need the httpd I wouldn't put
 it in front of
 tomcat, since besides less performance and security
 issues (last one
 like a month (?) ago with mod_jk) it doesn't bring
 you any benefits.
 Without knowing your requests (duration, resources
 they consume etc)
 its hard to make any estimations at all, but
 normally (whatever
 normally is) and on fair hardware 40 requests a
 second are easily
 served by one tomcat. So you could set up two
 machines with tomcats,
 put the traffic on one of them and let your hw
 loadbalancer perform
 the failover to the spare machine if needed.
 
 regards
 Leon
 
 P.S. There are indeed some real scenarios, where a
 httpd in front
 would be useful: down page, ssl, port 80 stress, but
 since you have a
 loadbalancer, it will be serving it much better as
 httpd, so use your
 lb features.
 
 On 4/19/07, Eqbal [EMAIL PROTECTED] wrote:
  Hello,
 
  We are planning on using Tomcat as the Servlet
  container for one of our production systems. I
 would
  like to know if there are any performance issues
 using
  it together with Apache webserver 2.0 and the ajp
  connector (using mod_rewrite). Is performance
 expected
  to be better if we double up Tomcat as a webserver
 and
  not use apache at all.
  I heard an opinion that using apache with tomcat
 may
  mean worse performance?
  The site is a medium traffic site with about 800
  concurrent users, about 40 hits per second. We
 plan on
  using a hardware load balancer and we were not
  planning on putting the webserver outside the
  firewall, tomcat behind the firewall kind of
  configuration, so our webserver and app server are
 on
  the same hardware (Suse Linux). Original idea was
 to
  place static files on the webserver (apache 2.0)
 and
  servlets/jsps on Tomcat.
  I appreciate any feedback.
  Is this list searchable somewhere on the web? So I
 can
  search any pervious discussions on this topic?
 
  Thanks.
 
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam
 protection around
  http://mail.yahoo.com
 
 

-
  To start a new topic, e-mail:
 users@tomcat.apache.org
  To unsubscribe, e-mail:
 [EMAIL PROTECTED]
  For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 
 

-
 To start a new topic, e-mail:
 users@tomcat.apache.org
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



smime.p7s
Description: S/MIME cryptographic signature


Re: log4j exception only when stopping and starting a web application

2007-02-27 Thread Gary Evesson

On 2/27/07, Rachel Wilson [EMAIL PROTECTED] wrote:



I am deploying an unpacked webapp directory to TOMCAT_HOME/webapps/myapp,
If i (stop and) start tomcat then my application runs fine and the logging
works fine.  However if i stop the application (successfully, it seems)
and
restart it using Tomcats manager app then I get the following error:

2007-02-27 16:21:17,671 ERROR http-8080-Processor3
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager] -
FAIL - Application at context path /myapp could not be started
java.lang.NullPointerException
at
org.apache.log4j.helpers.PatternConverter.spacePad(PatternConverter.java
:106
)
at
org.apache.log4j.helpers.PatternConverter.format(PatternConverter.java:68)



It looks like you have bad syntax in you log4j.properties file.

--
Gary Evesson


Re: Can tomcat send out event about persistent connection being closed?

2007-02-26 Thread Gary Evesson

On 2/26/07, M M [EMAIL PROTECTED] wrote:


Thanks for your reply.

Our client application will always use keep-alive which is the default
beahvior of HTTP/1.1 and it does not do simultaneous connections to the web
server.

Thanks.

Monica



Why use HTTP for a connection that is persistent? Wouldn't you be better off
using RMI or some similar technology? HTTP was designed to be
connectionless. The keepalive is an optimization trick, and is specifically
layered beneath the ability of the programmer to utilize or control.


--
Gary Evesson


RE: Peak load of Tomcat-powered server(s)?

2006-12-24 Thread Gary Evesson
Generally in a production environment, increasing the number of threads from
the default is compulsory. You need to balance that against the amount of
memory that you have allocated for your JVM, which needs to be balanced
against the amount of memory available in the machine.

Handling concurrent users generally comes back to the number of connections
that your architecture can handle and how much work your database server(s)
(assuming you have some) can handle. Our experience has been that these
things become an issue before tomcat does. It depends on your application *a
lot*.

Nothing beats real load testing to figure out where *your* stress points
are. They are probably going to be different to other people...

Gary

-Original Message-
From: Li Ma [mailto:[EMAIL PROTECTED] 
Sent: Sunday, December 24, 2006 12:35 PM
To: Tomcat Users List
Subject: Re: Peak load of Tomcat-powered server(s)?

Actually you can imagine the server serves a site like mySpace where people
can access their own home, blog, images, forum, etc. I know it is still not
easy to answer, but I'm not looking for an answer to my specific question.
I'm just looking for any similiar experience that can be shared and hoping I
can learn some.

Another question, how many threads do you think Tomcat can have on one
machine? And will increasing number of threads help processing more
requests? I think 100-150 per server per second is not a good number. But if
it is true, does that mean Tomcat is not suitable for large website? And
what does commercial products like WebLogic can normally do?

Well, lots of question at my end. Thanks for sharing of your idea. Any thing
will help.

Best!

Li

On 12/24/06, Leon Rosenberg [EMAIL PROTECTED] wrote:

 The question is impossible to answer, since you don't tell us what a
 user will do :-)
 However, to give you an example, if your requests are somewhat
 normal-web-requests (producing html) than going for 100-150 per
 second and server should be a reasonable value.

 regards
 Leon

 P.S. Of course it depends hardly on your use-cases... for example your
 apache in front of tomcat could reduce the performance by 10% without
 giving you anything in exchange.

 On 12/24/06, Li Ma [EMAIL PROTECTED] wrote:
  I need to setup for a client to run a myspace-like site. My client kept
  asking me how many concurrent user's I can support. I really don't know
 the
  answer.
 
  We will use Apache, jk_mod, Tomcat and Oracle(clustered). We will use
 X86
  servers with Linux.
 
  Can anyone share your experience and let me know the best load you have
  achieved?
 
  Thanks a lot and Merry Christmas!
 
  --
  Li Ma
  [EMAIL PROTECTED]
  http://www.idealtechs.com
 
 

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Li Ma
[EMAIL PROTECTED]
http://www.idealtechs.com


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.0.28 memory leak

2006-03-07 Thread Gary Evesson

[EMAIL PROTECTED] wrote:

Why do I have to make my class serializable.It is a simple web application
using the MemberData class for storing some data???

Because you are pushing it onto the session.

- Gary

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.0.28 memory leak

2006-03-07 Thread Gary Evesson

[EMAIL PROTECTED] wrote:

Yes I am putting it out in the session but I get the error after the
service has broken and at that point its probably trying to persist data???
and that should be serializable.
My issue is why doesthe service break in the first place?
I am just doing refesh on a page several times??
  
The breakage of the service is not indicated in the exception that you 
have sent. This is the container attempting to persist the sessions as 
the web app is shutting down. Assuming the class you are adding to the 
session is simple, then the standard serialization will work fine. Just 
make your class implement Serializable.


You need to investigate further.


I was reading this could this be an issue?
http://issues.apache.org/bugzilla/show_bug.cgi?id=36541
  
Unlikely. The exception is not related to that. Concurrency issues such 
as this would require significant load from one user. I assume that you 
are not generating high load?


- Gary

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: SSL Handshake before parameters sent???

2005-11-22 Thread Gary Evesson
Depends how they are sent. Parameters sent in a POST will be encrypted using
SSL. No user interaction required.

Parameters sent using GET will not be encrypted unless you do it yourself.

Gary Evesson
Decentrix Inc
 
-Original Message-
From: John MccLain [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 22, 2005 2:39 PM
To: Tomcat user list
Subject: SSL Handshake before parameters sent???

We have a servlet that is served by Tomcat. IIS is employed to redirect ot
Tomcat via AJP. IIS is also SSL enabled as our data is sensistive.

I wish to call a servlet and pass SSL encrypted data. BUT, to start the SSL
handshake off, I am making a servlet request with the data I wish to be SSL
encrypted.

My question is

If I call a servlet from a browser and pass the servlet some parameters that
need to be sent encrypted, do the parameters get SSL encrypted BEFORE they
are sent, or are they sent clear text, then the SSL Handshake, then all
other data sent is encrypted?

John McClain
Senior Software Engineer
TCS Healthcare
[EMAIL PROTECTED]
(530)886-1700x235
Skepticism is the first step toward truth


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




smime.p7s
Description: S/MIME cryptographic signature