Tomcat cluster tuning

2003-09-11 Thread Cristopher Daniluk
We are runing a cluster of 3 apache servers and 2 tomcat servers
connected via AJP w/Oracle on backend.

The cluster has been performing very well but we've had a recent load
spike that's causing the tomcat servers to start swapping pretty
hardcore despite JVM limitations.

What is the -Xmx option limiting? Threads? Defined services? Instances
of Tomcat?

I would've thought that it would limit the entire tomcat instance, but
we have been far exceeding the 768mb limit we set.

We're connecting to Oracle on the back end via the JDBC thin client.
When the site starts swapping, performance on Oracle queries goes
exponentially downhill. A non-db page takes about 1 second to load
before swapping, vs 5 seconds to load when its swapping. On the other
hand, a db intensive page takes about 5 seconds to load normally, vs
about 40-50 seconds when it begins to swap. That number begins to crawl
quickly up until it exceeds the 5 minute max execution time and Tomcat
cuts the request off.

The servers are basically identically configured P1.8ghz machines with
1gb ram each. The connector line from server.xml is:

  Connector
className=org.apache.coyote.tomcat4.CoyoteConnector
port=8009 minProcessors=5 maxProcessors=100
enableLookups=true redirectPort=8443
acceptCount=100 debug=0 connectionTimeout=-1
 
protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler
/

And we're running Apache 2.0.47 w/mod_jk1 and AJP1.3. the
workers.properties is set to nonweighted balancing.

Are there any options to tune tomcat to reduce memory footpritn and to
let it queue more? We were initially running more maxProcessors but I
turned it down hoping to alleviate the congestion. Tried turning it up
thinking maybe the accept queue was the problem too, but that made it
worse.

Thanks,

Cris



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



RE: Tomcat cluster tuning

2003-09-11 Thread Cristopher Daniluk
Are there any recommendations for what JVM would work best?

We're not doing anything fancy, so presumably any VM that works well
with tomcat would work well for us. Are there any sites that talk about
the different JVM tuning options that affect Tomcat? I haven't seen that
many.

-Original Message-
From: Ralph Einfeldt [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 11, 2003 12:46 PM
To: Tomcat Users List
Subject: RE: Tomcat cluster tuning


mx is limiting the heap of a java process.

In other words:
It limits the total heap for one tomcat instance.

The total memory can be much higher:

- stacksize per thread
  Some vm's let you set these values (-Xss).
  If you have some hundred of threads that can make up some memory.

- static memory (like string constants, the code, ...)
  That pretty much defined at compile time.

- and may be further sorts of memories that depend on 
  the vendor and version of the jdk.

Regarding your config:

You can try to play with the combination of
   maxProcessors
   connectionTimeout
   acceptCount

I'm not shure how the accepted but not processed 
request are handled (wether they are queued in one
thread, or if each has it's own thread)

There isn't much more you can change in tomcat.
The best recommendation I have is to find out where 
the memory comes from and either to cure the cause or
find out that you have to live with that memory usage
and spend more memory.

 -Original Message-
 From: Cristopher Daniluk [mailto:[EMAIL PROTECTED]
 Sent: Thursday, September 11, 2003 5:33 PM
 To: [EMAIL PROTECTED]
 Subject: Tomcat cluster tuning
 
 
 
 What is the -Xmx option limiting? Threads? Defined services? 
Instances 
 of Tomcat?
 
 I would've thought that it would limit the entire tomcat 
instance, but 
 we have been far exceeding the 768mb limit we set.
 
 
   Connector 
 className=org.apache.coyote.tomcat4.CoyoteConnector
 port=8009 minProcessors=5 maxProcessors=100
 enableLookups=true redirectPort=8443
 acceptCount=100 debug=0 connectionTimeout=-1
  
 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler
 /
 

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





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



RE: Trouble with Apache 1.3.28/Tomcat 4.124/mod_jk 1.24

2003-08-15 Thread Cristopher Daniluk
Uhm...

snip

And I didn't touch the Connector Classname entry in server.xml:

!-- Define an AJP 1.3 Connector on port 8009 --
!--
Connector className=org.apache.ajp.tomcat4.Ajp13Connector
   port=8009 minProcessors=5 maxProcessors=75
   acceptCount=10 debug=0/

snip


Notice the !-- before the connector, and the -- shortly thereafter.

That's a comment, so you have that Ajp13Connector commented out at the
moment :)

Try removing the !-- and -- from around the Connector tag and restart
Jakarta.


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



RE: Trouble with Apache 1.3.28/Tomcat 4.124/mod_jk 1.24

2003-08-15 Thread Cristopher Daniluk
Sorry, I forgot to mention in my first post:

   JkMount /*.jsp ajp13
   JkMount /*/servlet/ ajp13
   JkMount /examples ajp13
   JkMount /examples/* ajp13

Where you have ajp13, mod_jk is expecting the name of the worker - in
this case testWorker. Try:

   JkMount /*.jsp testWorker
   JkMount /*/servlet/ testWorker
   JkMount /examples testWorker
   JkMount /examples/* testWorker

Cris

-Original Message-
From: Henry Kwan [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 15, 2003 6:07 PM
To: [EMAIL PROTECTED]
Subject: Re: Trouble with Apache 1.3.28/Tomcat 4.124/mod_jk 1.24


 
 Notice the !-- before the connector, and the -- shortly thereafter.
 
 That's a comment, so you have that Ajp13Connector commented out at the

 moment :)
 
 Try removing the !-- and -- from around the Connector tag and 
 restart Jakarta.
 

Hi.  Thanks for pointing that out.  I didn't notice that before.  I
removed 
that comment and commented out the CoyoteConnector entry.

Unfortunately, the error message seems to be the same:

[Fri Aug 15 14:57:45 2003]  [jk_uri_worker_map.c (477)]: Attempting to
map 
URI '/examples/jsp/index.html'
[Fri Aug 15 14:57:45 2003]  [jk_uri_worker_map.c (502)]: 
jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13 - 
/examples/
[Fri Aug 15 14:57:45 2003]  [jk_worker.c (132)]: Into
wc_get_worker_for_name 
ajp13
[Fri Aug 15 14:57:45 2003]  [jk_worker.c (136)]: wc_get_worker_for_name,

done did not found a worker

There is something listening at 8009 (since I can telnet to it) and I 
noticed this entry earlier in the log:

[Fri Aug 15 14:57:35 2003]  [jk_worker.c (88)]: Into wc_open [Fri Aug 15
14:57:35 2003]  [jk_worker.c (222)]: Into build_worker_map, 
creating 1 workers
[Fri Aug 15 14:57:35 2003]  [jk_worker.c (228)]: build_worker_map,
creating 
worker testWorker
[Fri Aug 15 14:57:35 2003]  [jk_worker.c (148)]: Into wc_create_worker
[Fri Aug 15 14:57:35 2003]  [jk_worker.c (162)]: wc_create_worker, about
to 
create instance testWorker of ajp13
[Fri Aug 15 14:57:35 2003]  [jk_ajp13_worker.c (108)]: Into 
ajp13_worker_factory
[Fri Aug 15 14:57:35 2003]  [jk_worker.c (171)]: wc_create_worker, about
to 
validate and init testWorker
[Fri Aug 15 14:57:35 2003]  [jk_ajp_common.c (1343)]: Into 
jk_worker_t::validate
[Fri Aug 15 14:57:35 2003]  [jk_ajp_common.c (1364)]: In 
jk_worker_t::validate for worker testWorker contact is localhost:8009
[Fri Aug 15 14:57:35 2003]  [jk_ajp_common.c (1397)]: Into
jk_worker_t::init [Fri Aug 15 14:57:35 2003]  [jk_ajp_common.c (1421)]:
In jk_worker_t::init, 
setting socket timeout to 0
[Fri Aug 15 14:57:35 2003]  [jk_worker.c (187)]: wc_create_worker, done
[Fri Aug 15 14:57:35 2003]  [jk_worker.c (238)]: build_worker_map,
removing 
old testWorker worker 
[Fri Aug 15 14:57:35 2003]  [jk_worker.c (250)]: build_worker_map, done
[Fri Aug 15 14:57:35 2003]  [jk_worker.c (111)]: wc_open, done 1


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



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



Oracle connection pooling

2003-08-14 Thread Cristopher Daniluk
We are running a fairly large ecommerce site consisting of 3 apache
2.0.48 servers being balanced between using UltraMonkey/ldirector and 2
tomcat servers with AJP1.3. Everything is Linux except the back end
which is a fairly hefty and firewalled Sun running Oracle8i. 

The webapps build a connection pool to oracle via the oracle.jdbc.pool.*
connection pool. The pool instantiates fine and everything is great, but
gradually the pool begins to break down. Idle connections are closed by
Oracle (not sure if its oracle itself or the fw..), but the oracle pool
doesn't figure it out. If someone happens to get the dead connection,
Tomcat completely hangs on all threads until the session-timeout
expires. Even the session replication code stops and the apache servers
and the other tomcat in the cluster mark it offline. During the peak
traffic it isn't so bad but at the end of the day after load goes back
down, it's a big problem. 

We initially used DBCP but it didn't work for crap with Oracle. Is there
a better pool to use with Oracle and Tomcat in a cluster environment and
if not, is there a way we can get the Oracle pool to recycle some of
these bad connections without blowing up the server?

Thanks,

Cris Daniluk

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



RE: Does load balancing with sticky sessions work with mod_jk?

2003-08-14 Thread Cristopher Daniluk
Turn on the mod_jk logging. We had all sorts of problems with it at
first. Turned out to be an incompatibility between the binary and apache
with ours, but there's lots of possibilities.

Check the mod_jk log and see if its having communication errors with
Tomcat.
Check the Tomcat logs (your app logs AND catalina.out) and see if
anything shows up such as an exception.
Use Mozilla and get LiveHTTPHeaders. This will show you the raw URL
requests. Watch the JSESSIONID. Make sure the jvmRoute is appeneded to
the end of the session.. i.e. JSESSIONID=abcdef12345.myTomcat1. Make
sure the domain is being set right and that its not getting ignored. If
you're sending a cookie and then the response is giving you a new
cookie, its probably because of communication problems between Apache
and Tomcat. 

Paste relevant parts of your httpd.conf, workers.properties, and
server.xml if you still have trouble. Any helpful logs too...

Cris

-Original Message-
From: G. Wade Johnson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 14, 2003 3:08 PM
To: Tomcat Users List
Subject: Re: Does load balancing with sticky sessions work with mod_jk?


I've now compiled mod_jk 1.2.4 from source for Apache 1.3.28 under
Win32.

My jvmRoute attributes exist and match the entries in workers.properties
for the appropriate hosts.

I'm still showing my requests ping-ponging between the two servers.

Can you think of anything else that I could be doing wrong?

G. Wade

Cristopher Daniluk wrote:
 
 Still advisable to compile the connector from source.
 
 Also maek sure your worker names in worker.properties match the names 
 of the jvmRoute.
 
 -Original Message-
 From: G. Wade Johnson [mailto:[EMAIL PROTECTED]
 Sent: Thursday, August 14, 2003 11:29 AM
 To: Tomcat Users List
 Subject: Re: Does load balancing with sticky sessions work with 
 mod_jk?
 
 Thanks for the response.
 
 I have the jvmRoute attribute set on both of my Tomcats.
 
 I am (unfortunately) running under Windows at the moment. From your 
 response, I guess you are not. I'll see if I can compile the source.
 
 Thanks,
 G. Wade
 
 Cristopher Daniluk wrote:
 
  Make sure you set a jvmRoute and if you have trouble, compile the 
  mod_jk.so from src rather than using a binary.
 
  It works just fine...
 
  -Original Message-
  From: G. Wade Johnson [mailto:[EMAIL PROTECTED]
  Sent: Thursday, August 14, 2003 10:56 AM
  To: Tomcat Users List
  Subject: Does load balancing with sticky sessions work with mod_jk?
 
  Has anyone gotten load balancing with stick sessions working with 
  Apache
  1.3.* and mod_jk?
 
  G. Wade
 
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

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



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



RE: Clustering applications

2003-08-14 Thread Cristopher Daniluk
We use tomcat-replication.jar, which is the backport that someone else
mentioned earlier. It works well as a failover tool, but there is a
slight delay in replication. Maybe tuning could alleviate that but I
think with rapid browsing, it may not be able to keep up. We use the
replication for failover support, but we still keep sticky sessions via
a jvmRoute..

Cris

-Original Message-
From: Sean Leblanc [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 12, 2003 6:50 PM
To: [EMAIL PROTECTED]
Subject: Clustering applications


Suppose I wanted to set up Tomcat and share some common info across apps
running on the instances of Tomcat. How would I do this?

When googling for a bit, I came across JavaSpaces. Is anyone else using
this, or is that barking up the wrong tree?


Thanks,
Sean LeBlanc

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



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



RE: Does load balancing with sticky sessions work with mod_jk?

2003-08-14 Thread Cristopher Daniluk
Make sure you set a jvmRoute and if you have trouble, compile the
mod_jk.so from src rather than using a binary.

It works just fine...

-Original Message-
From: G. Wade Johnson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 14, 2003 10:56 AM
To: Tomcat Users List
Subject: Does load balancing with sticky sessions work with mod_jk?


Has anyone gotten load balancing with stick sessions working with Apache
1.3.* and mod_jk?

G. Wade

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



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



RE: Does load balancing with sticky sessions work with mod_jk?

2003-08-14 Thread Cristopher Daniluk
Still advisable to compile the connector from source.

Also maek sure your worker names in worker.properties match the names of
the jvmRoute.

-Original Message-
From: G. Wade Johnson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 14, 2003 11:29 AM
To: Tomcat Users List
Subject: Re: Does load balancing with sticky sessions work with mod_jk?


Thanks for the response.

I have the jvmRoute attribute set on both of my Tomcats.

I am (unfortunately) running under Windows at the moment. From your
response, I guess you are not. I'll see if I can compile the source.

Thanks,
G. Wade

Cristopher Daniluk wrote:
 
 Make sure you set a jvmRoute and if you have trouble, compile the 
 mod_jk.so from src rather than using a binary.
 
 It works just fine...
 
 -Original Message-
 From: G. Wade Johnson [mailto:[EMAIL PROTECTED]
 Sent: Thursday, August 14, 2003 10:56 AM
 To: Tomcat Users List
 Subject: Does load balancing with sticky sessions work with mod_jk?
 
 Has anyone gotten load balancing with stick sessions working with 
 Apache
 1.3.* and mod_jk?
 
 G. Wade
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

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



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



RE: hardware recommendation, Tomcat with Apache web server

2003-08-14 Thread Cristopher Daniluk
What kind of load? Tomcat and Apache don't use anythign but a few mb of
ram when you're not doing anything :)

-Original Message-
From: Paul [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 4:35 PM
To: Tomcat Users List
Subject: hardware recommendation, Tomcat with Apache web server


what would be appropriate hardware for a Tomcat with Apache web server
running on Win2k server (for a public OLTP-type web service with
database backend running on its own dedicated machine)?

probably use striped (raid-0) scsi drive system, but not sure if dual
cpu's required, P3, P4 or Zeon system would be appropriate?

-paul lomack





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



RE: Clustering applications

2003-08-14 Thread Cristopher Daniluk
We have it set to true. The developers are serializing way more than
they should be to the session though.. 

-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 12:21 AM
To: Tomcat Users List
Cc: [EMAIL PROTECTED]
Subject: RE: Clustering applications


cris,
what is your useDirtyFlag set to in the server.xml.
This should be set to true, if you wanna optimize the session
replication performance.

Filip

 -Original Message-
 From: Cristopher Daniluk [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 12, 2003 8:47 PM
 To: 'Tomcat Users List'
 Subject: RE: Clustering applications


 We use tomcat-replication.jar, which is the backport that someone else

 mentioned earlier. It works well as a failover tool, but there is a 
 slight delay in replication. Maybe tuning could alleviate that but I 
 think with rapid browsing, it may not be able to keep up. We use the 
 replication for failover support, but we still keep sticky sessions 
 via a jvmRoute..

 Cris

 -Original Message-
 From: Sean Leblanc [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 12, 2003 6:50 PM
 To: [EMAIL PROTECTED]
 Subject: Clustering applications


 Suppose I wanted to set up Tomcat and share some common info across 
 apps running on the instances of Tomcat. How would I do this?

 When googling for a bit, I came across JavaSpaces. Is anyone else 
 using this, or is that barking up the wrong tree?


 Thanks,
 Sean LeBlanc

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



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




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



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



RE: hardware recommendation, Tomcat with Apache web server

2003-08-14 Thread Cristopher Daniluk
Assuming your application is well written and not doing anything
insanely complex, any modestly configured box not running a DB would
handle that load fine. Start with a ~2ghz server, w/1gb of ram as your
baseline, and then add in the level of redundancy you want - failover
nics, failover cpus, RAID configs, etc...

-Original Message-
From: Paul [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 13, 2003 5:01 PM
To: Tomcat Users List
Subject: Re: hardware recommendation, Tomcat with Apache web server


not sure what the load is going to be ... would be nice to be able to
adequately handle aprox. 20-30 simultaneous users.  Not sure if that
answers your question properly. -pl

- Original Message - 
From: Cristopher Daniluk [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Wednesday, August 13, 2003 4:46 PM
Subject: RE: hardware recommendation, Tomcat with Apache web server


 What kind of load? Tomcat and Apache don't use anythign but a few mb 
 of ram when you're not doing anything :)

 -Original Message-
 From: Paul [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, August 13, 2003 4:35 PM
 To: Tomcat Users List
 Subject: hardware recommendation, Tomcat with Apache web server


 what would be appropriate hardware for a Tomcat with Apache web server

 running on Win2k server (for a public OLTP-type web service with 
 database backend running on its own dedicated machine)?

 probably use striped (raid-0) scsi drive system, but not sure if dual 
 cpu's required, P3, P4 or Zeon system would be appropriate?

 -paul lomack





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





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



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



RE: Oracle connection pooling

2003-08-14 Thread Cristopher Daniluk
I agree. I think its something else, but the real problem is - why
doesn't the Oracle connection pool at least check the TCP state of the
conn before it works? Is it because it sucks and shouldn't be used?

As best I can tell, we're following all the documentation for the oracle
pool to the letter.

-Original Message-
From: Eric J. Pinnell [mailto:[EMAIL PROTECTED] 
Sent: Saturday, August 09, 2003 12:07 AM
To: Tomcat Users List
Subject: Re: Oracle connection pooling


Hi,

Firewalls, and I'm not speaking for all of them, as a rule of thumb
close _idle_ connections after an hour.

Your connections should be done well before that.

-e

On Fri, 8 Aug 2003, Cristopher Daniluk wrote:

 We are running a fairly large ecommerce site consisting of 3 apache 
 2.0.48 servers being balanced between using UltraMonkey/ldirector and 
 2 tomcat servers with AJP1.3. Everything is Linux except the back end 
 which is a fairly hefty and firewalled Sun running Oracle8i.

 The webapps build a connection pool to oracle via the 
 oracle.jdbc.pool.* connection pool. The pool instantiates fine and 
 everything is great, but gradually the pool begins to break down. Idle

 connections are closed by Oracle (not sure if its oracle itself or the

 fw..), but the oracle pool doesn't figure it out. If someone happens 
 to get the dead connection, Tomcat completely hangs on all threads 
 until the session-timeout expires. Even the session replication code 
 stops and the apache servers and the other tomcat in the cluster mark 
 it offline. During the peak traffic it isn't so bad but at the end of 
 the day after load goes back down, it's a big problem.

 We initially used DBCP but it didn't work for crap with Oracle. Is 
 there a better pool to use with Oracle and Tomcat in a cluster 
 environment and if not, is there a way we can get the Oracle pool to 
 recycle some of these bad connections without blowing up the server?

 Thanks,

 Cris Daniluk

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




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


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



Mod_jk/tomcat errors

2003-08-09 Thread Cristopher Daniluk
After a lot of pain, I found that the real root of the problem is that
JK is having trouble communicating with Tomcat:

[Sun Aug 10 07:02:14 2003]  [jk_ajp13_worker.c (635)]: Error connecting
to the Tomcat process.
[Sun Aug 10 07:02:14 2003]  [jk_ajp13_worker.c (848)]: In
jk_endpoint_t::service, send_request failed in send loop 0
[Sun Aug 10 07:02:14 2003]  [jk_connect.c (143)]: jk_open_socket,
connect() failed errno = 111

This is showing up every 15 requests or so for me. I have seen a ton of
threads about this both here and elsewhere, but no clear cut way to
resolve it.

I don't think it is a timeout problem, and I disabled
MaxClientsPerRequest in Apache to try and help. Nothing I've done so far
has helped.

Thanks,

Cris

-Original Message-
From: Cristopher Daniluk 
Sent: Saturday, August 09, 2003 10:52 AM
To: Tomcat Users List
Subject: RE: Oracle connection pooling


I agree. I think its something else, but the real problem is - why
doesn't the Oracle connection pool at least check the TCP state of the
conn before it works? Is it because it sucks and shouldn't be used?

As best I can tell, we're following all the documentation for the oracle
pool to the letter.

-Original Message-
From: Eric J. Pinnell [mailto:[EMAIL PROTECTED] 
Sent: Saturday, August 09, 2003 12:07 AM
To: Tomcat Users List
Subject: Re: Oracle connection pooling


Hi,

Firewalls, and I'm not speaking for all of them, as a rule of thumb
close _idle_ connections after an hour.

Your connections should be done well before that.

-e

On Fri, 8 Aug 2003, Cristopher Daniluk wrote:

 We are running a fairly large ecommerce site consisting of 3 apache
 2.0.48 servers being balanced between using UltraMonkey/ldirector and 
 2 tomcat servers with AJP1.3. Everything is Linux except the back end 
 which is a fairly hefty and firewalled Sun running Oracle8i.

 The webapps build a connection pool to oracle via the
 oracle.jdbc.pool.* connection pool. The pool instantiates fine and 
 everything is great, but gradually the pool begins to break down. Idle

 connections are closed by Oracle (not sure if its oracle itself or the

 fw..), but the oracle pool doesn't figure it out. If someone happens
 to get the dead connection, Tomcat completely hangs on all threads 
 until the session-timeout expires. Even the session replication code 
 stops and the apache servers and the other tomcat in the cluster mark 
 it offline. During the peak traffic it isn't so bad but at the end of 
 the day after load goes back down, it's a big problem.

 We initially used DBCP but it didn't work for crap with Oracle. Is
 there a better pool to use with Oracle and Tomcat in a cluster 
 environment and if not, is there a way we can get the Oracle pool to 
 recycle some of these bad connections without blowing up the server?

 Thanks,

 Cris Daniluk

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




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


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


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