Re: JK 1.2.14.1 SIG BUS Error on Solaris 9

2005-09-06 Thread David Rees
On 9/2/05, Guernsey, Byron (GE Consumer  Industrial)
[EMAIL PROTECTED] wrote:
 I apoligize for adding to this, but I'm hoping to jar someones memory.
 I gdb'ed the process now and the BUS error occurs in:
snip
 Program received signal SIGBUS, Bus error.
 0xfdfb4208 in service (e=0xf7c90, s=0xfe501848, l=0x118b40,
 is_error=0xfe500840) at jk_lb_worker.c:605
 jk_lb_worker.c:605: No such file or directory.
 (gdb) bt
 #0  0xfdfb4208 in service (e=0xf7c90, s=0xfe501848, l=0x118b40,
 is_error=0xfe500840) at jk_lb_worker.c:605

That is the exact same core dump and back trace that I reported a
while back when running on SGI Irix.  Could be a 64bit or big endian
problem?

http://marc.theaimsgroup.com/?l=tomcat-devm=112501659012202w=2

-Dave

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



Re: JK 1.2.14.1 SIG BUS Error on Solaris 9

2005-09-06 Thread David Rees
On 9/6/05, David Rees [EMAIL PROTECTED] wrote:
 
 That is the exact same core dump and back trace that I reported a
 while back when running on SGI Irix.  Could be a 64bit or big endian
 problem?
 
 http://marc.theaimsgroup.com/?l=tomcat-devm=112501659012202w=2

I've opened a bug for this issue:
http://issues.apache.org/bugzilla/show_bug.cgi?id=36525

-Dave

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



Re: Big problem with running tomcat

2005-09-02 Thread David Rees
On 9/2/05, jmail [EMAIL PROTECTED] wrote:
 
  I would like to make something like virtual hosts using apache and tomcat, 
 but some 
 virtual host should take tomcat for reply.

You need to use mod_jk.  Look at the docs for it and the solution will
become clear.

-Dave

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



Re: Building Mod_jk for HP-UX fails

2005-09-01 Thread David Rees
On 8/30/05, Ivo Van Den Maagdenberg
[EMAIL PROTECTED] 
 After the jk/native/common directory is built, make does seems not pass
 through the jk/native/apache-1.3 directory properly. I would appreciate
 some help in getting make this to work.

snip
 
 Make output below:
 
 Making all in apache-1.3
 Make: line 23: syntax error.  Stop.
 *** Error exit code 1

What version of make are you using?  Are you using GNU make?  If not, try that.

-Dave

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



Re: HTTP/1.1 GZIP compression and its impact on server

2005-07-29 Thread David Rees
On 7/29/05, Ronald Klop [EMAIL PROTECTED] wrote:
 
 Compressing images is useless. We compress css and javascript and don't have 
 problems 
 with it, but our customers use quite new browsers, because the application 
 doesn't work in 
 pre-mozilla/pre-ie-5.5 at all.

I've had problems with compressed css/javascript using Firefox 1.0.6
and seem to encounter occasional problems with IE 6 based on reports
from customers.  My problems seem to occur on SSL sites, Firefox seems
to not load referenced css/javascript files correctly on occasion. 
For example, if using Squirrelmail, it seems that the occasionally css
doesn't get loaded correctly in one of the frames and I've seen
similar behavior where a javascript file doesn't get loaded causing
javascript errors.  Hard to reproduce.  I'm guessing it has to do the
combination of content compression and SSL and some timing bugs.

-Dave

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



Re: HTTP/1.1 GZIP compression and its impact on server

2005-07-28 Thread David Rees
On 7/28/05, Peddireddy Srikanth [EMAIL PROTECTED] wrote:
 can you tell me what would be the ideal page (or image or what ever it
 may be) size over which we can apply compression, so that we dont
 waste resources compressing smaller pages. I think may  be compressing
 each and every page will negate the gains that we achieve by
 compressing.
 Also can you tell me whether it is appropriate to apply compression on
 image files (like .gif, . jpeg etc) as some of image formats are
 compressed already in themselves.

As long as the page is over a few kBytes, it is generally worth
compressing.  However, the performance difference for compressing or
not compressing small pages is fairly insignificant so it's easier to
just compress all html content.

I have seen problems with both MSIE and Firefox when serving them
compressed CSS and Javascript files, so I can only recommend that you
serve compressed text/html, text/plain and text/xml.  Don't bother
compressing image files, they should already be compressed.

-Dave

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



Re: clustering without loadbalancing

2005-04-14 Thread David Rees
On 4/14/05, Gaurav Bansal [EMAIL PROTECTED] wrote:
 I want to form a two node cluster of Tomcat servers which can failover but 
 there should be no 
 load balancing. But it should support session replication.

I assume that you want to do it with Apache and have mod_jk handle the
distribution of requests to Tomcat as well?

-Dave

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



Re: ThreadPool logFull

2005-04-14 Thread David Rees
On 4/13/05, Patty O'Reilly [EMAIL PROTECTED] wrote:
 
 I'm running tomcat 5.0.30.
 
 After running for a week or so the server begins to slow down and
 finally crashes because it is out of threads. I can see the java
 processes accumulating day by day.

Send the process a -QUIT signal if on Linux, do the equivalent on
Windows and you can get stack traces showing where each thread is
getting stuck instead of returning to the thread pool for new
processing.

 I'm pretty new to tomcat. Not sure if the error is in my apache
 server's workers.properties, or the tomcat servers server.xml, or

It's probably not a Tomcat issue, but your something in your
application which is getting hung up.

-Dave

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



Re: How to unsunscribe ?

2005-04-07 Thread David Rees
On Apr 7, 2005 11:47 AM, Krishna Gunturu [EMAIL PROTECTED] wrote:
  How to unsubscribe from Tomcat Users List?
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

^^^
See above!

-Dave

PS - And below!

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



Re: Apache, tomcat and virtual host

2005-04-06 Thread David Rees
On Apr 5, 2005 11:23 PM, david joffrin [EMAIL PROTECTED] wrote:
 Yes,
 
 I'd like to set up the following set up the following URLs:
 http://www.domain1.com/
 http://www.domain2.com/
 https://sthg.domain1.com/
 but this http://www.domain1.com/ must redirects to a tomcat instance and I
 would like to implement load balancing on this one (so using mod_jk).
 
 How should I configure my httpd.conf to realize that as so far if I
 implement mod_jk on my https instance, all domains are redirected to the
 tomcat instance.

Why don't you post links to or paste in your httpd.conf and
tomcat-workers.properties so that we have half a chance of figuring
out your problem?

-Dave

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



Re: Authentication problems with tomcat clustering.

2005-04-05 Thread David Rees
On Apr 5, 2005 3:13 PM, David Owens [EMAIL PROTECTED] wrote:
 After further debug, I see this is happening because mod_jk is
 ignoring the sticky sessions, and continuing to lb back and forth.
 After looking at the mod_jk code, I see it is looking for something
 after the '.' character in the JSESSIONID to tell it where the session
 should stick.
 
 How do I setup tomcat (or is it httpd) to provide this piece of
 information?

The name of your worker in the mod_jk config must match the value in
each Tomcat instance's server.xml.

For example (abbreviated configs) in tomcat-workers.properties:

worker.list=tomcat1,tomcat2

And in tomcat1's server.xml:
Engine jvmRoute=tomcat1/

And in tomcat2's server.xml:
Engine jvmRoute=tomcat2/

Hope this helps...

-Dave

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



Re: Apache, tomcat and virtual host

2005-04-05 Thread David Rees
On Apr 5, 2005 4:17 AM, david joffrin [EMAIL PROTECTED] wrote:
 
 I would like to run the following configurations with only one
 machine: 3 domains. Let's name them, www.domain1.com and
 sthg.domain2.com and www.domain2.com.
 
 www.domain1.com runs on 80 using apache and php
 www.domain2.com runs on 8080 using tomcat, mysql...
 sthg.domain2.com runs on 443 using apache and php
 
 Using the virtual hosts, I managed to set-up successfully
 www.domain1.com and sthg.domain2.com. I am now trying to include
 mod_jk, but when doing that, I am loosing the virtual hosts features
 and all my requests (for all sites) are sent to the tomcat instance
 (including the https one).
 
 Is that possible should probably my first question?
 Has anyone some experience with a similar set-up?

Yes, it is possible to configure multiple virtual hosts with Apache
and Tomcat...

Your explanation of your current setup is confusing.  Are you trying
to setup the following URLs?

http://www.domain1.com/
http://www.domain2.com/
https://sthg.domain1.com/

-Dave

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



Re: Tomcat in a High Traffic Environment

2004-10-29 Thread David Rees
Mladen Turk wrote:

 Yes, but the keepalive is used mainly for making the 'state' out of
 'stateless' protocol, and it's main advantage is that you don't need
 to acquire a new connection all the time. Take a look at RFC2068.
 Even apache keeps the thread open on keepalive connections (Of course
 you have a KeepAliveTimeout).

 Without keepalive your cluster will perhaps work better in the lab,
 but it will fail in the real-user scenario.

This is false.  Your cluster will not break in a real-user scenario
without Keep-Alive turned on.  There are many HTTP servers out there which
default to Keep-Alive turned off.

Keep-Alive is not used for keeping state of a stateless protocol.  Pure
and simple, it is used to improve client-side performance when requesting
multiple resources in a short timespan by reducing the number of TCP/IP
connection starts and stops.  This is mostly noticable if your website
design requires the user to download a large number of small resources to
view a page.

It is very common to turn off Keep-Alive or significantly reduce it's
timeout when attempting to scale to a large number of users without
keeping a large number of usable connections idle.  You can easily double
the number of concurrent users handled by a server by turning off
Keep-Alive.  The only drawback is that if your pages have a large number
of resources to retrieve per page and your users have a high-latency
connection to the server.

-Dave


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



Re: Tomcat in a High Traffic Environment

2004-10-29 Thread David Rees
Andrew Miehs wrote:
 A connection pool of 750 threads seems unusable... How can 1 thread per
 connection scale? or have I misunderstood how tomcat uses its
 connection pool? And should all of these threads ever have something to
 do at the same time, the box would just fall over with a load of
 750

Keep in mind that most of these connections will not be utilizing much
CPU, they will most likely be busy sending/receiving data (or if
keep-alive is on waiting doing nothing).

 Would it not make more sense to use a smaller connection pool, and set
 up queues?

If you are serving resources which utilize a lot of CPU, then yes, it can
be beneficial.  You can use the OS's connection backlog on a listening
TCP/IP socket as your queue.  See the acceptCount parameter of the HTTP
Connector.  The default configuration has this set to 100.  So if you only
have 10 threads in your pool and all are busy, the OS will queue up to 100
additional connections to wait for a thread to become free.  If more than
100 connections are waiting, any further connections will have their
connection refused.

 Would it not then be better when the request has been processed, to put
 this into a second queue for requests which then go to the backend,
 etc, etc? So many threads can't help performance. Wouldn't the kernel
 be busy the whole time with context switching? and no user would ever
 get any data back

Regarding kernel-switching, note my earlier comment that you will find
that most connections are waiting for TCP/IP data to be either sent or
received.  In addition, any modern OS on decent hardware will scale to
thousands of threads without any issues.

-Dave


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



Re: FW: is reloading the web context sufficient ?

2004-09-07 Thread David Rees
Quinten Verheyen wrote:

 I would simply like to know how on-going HTTP traffic is handled when the
 classes get reloaded, either by the reloadable attribute in the context
 or by the Manager webapp reload function.

What version of Tomcat are you referring to?  Tomcat 4.1.x or Tomcat 5.0.x?

-Dave


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



Re: Can't compile jk 1.2.6

2004-08-03 Thread David Rees
Joseph Shraibman wrote, On 8/3/2004 7:29 PM:
no apxs given
checking for target platform... unix
no apache given
configure: error: Cannot find the WebServer
But the apxs does exist.  This is apache 2.0.50
I can't compile 1.2.5 either
Look above, closely.  Ask again if you can't figure it out.
-Dave
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: horrible problems with TC4.1 under RedHat Advanced Server

2004-08-01 Thread David Rees
Steve Summit wrote, On 8/1/2004 6:22 AM:
I've got a big, complicated web application (too complicated to
go into the details of here), and I'm having problems moving from
Red Hat 9 to Red Hat Advanced Server / Enterprise Server.
(The move is for support reasons.)

I suspect that there's some pernicious incompatibility between
this version of Tomcat, this version of j2sdk, and the C
libraries in these releases of RedHat.  (When I built these
machines, I think I had to manually install a C compatibility
library to get Java to work at all.)
There was a message to this list a month or so ago from
Harald Henkel describing some similar-sounding problems, but
it doesn't look like he got an answer.  He mentioned setting
LD_ASSUME_KERNEL to 2.4.1, and I'm going to try this, but it
sounded like that only slightly ameliorated, but didn't fix,
his problem.
It's definitely some sort of JVM/OS issue, and not directly related to 
Tomcat.  What glibc version are you running, are you running all errata 
for the system (up2date)?  Also upgarde to the latest JDK, and finally, 
if it is still not stable, try a LD_ASSUME_KERNEL setting of 2.2.5.

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


Re: SunONE versus Tomcat performance

2004-07-30 Thread David Rees
David Wall wrote:

  It is worth noting that Sun Java Web Server has better performance than
 Apache Tomcat; you can learn more about this from Sun Java Web Server vs.
 Apache/Tomcat Benchmarks.

 The link to the KeyLabs report is at
 http://www.keylabs.com/results/sun/SunONEFinalReport_Solaris.pdf

 Why would SunONE be anywhere from 2 to 5 times faster than Tomcat?

 They also suggest that Tomcat would start to show errors when loading 200
 users at a time, whereas SunONE could handle up to 500 users without any
 errors.

It's hard to say why the Apache/Tomcat combination would not perform as
well as SunONE (which I am not familar with), but without more details of
the Apache/Tomcat configuration it's too difficult to say.

Has anyone independantly tested SunONE compared to Apache/Tomcat?

-Dave


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



Re: tomcat 5.0.19 and NPTL

2004-07-27 Thread David Rees
QM wrote, On 7/27/2004 5:46 PM:
On Tue, Jul 27, 2004 at 05:28:56PM -0700, Sunitha Kumar wrote:
: Do we know if 5.0.19 can work with NPTL?
This has to do with the underlying JDK, not Tomcat.  If your JDK hasn't
been recompiled to take advantage of NPTL then it may very well stumble
through an NPTL environment.
Based on the number of set LD_ASSUME_KERNEL posts I've seen on this
list, I'd say the Sun JDK isn't NPTL-aware. ;)
I've been running Tomcat (previously version 5.0.25, now 5.0.27) using 
Java 1.4.2_05-b04 on Fedora Core 1 and 2 without any issues at all.

As I understand it, if the JDK is using Posix threads (which it does), 
then it is using NPTL threads by default, unless you set 
LD_ASSUME_KERNEL to 2.2.5.

You can verify this by running `ps -auxf`, if the Java process appears 
only once, it is running using NPTL, if it appears as a big tree of 
processes, you are not.  The JDK-1.5 beta releases have run Tomcat just 
fine in my limited testing.

FWIW, the problems with the JDK crashing or hanging when using NPTL were 
a combination of JDK and glibc bugs.  In all cases, they can be fixed by 
making sure you are running the latest JDK and glibc for your Linux 
distribution.

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


Re: Is there such a beast ? (virtual directories)

2004-07-13 Thread David Rees
Chong Yu Meng wrote, On 7/13/2004 9:07 AM:
Mike Curwen wrote:
host ...
  context docBase=/path/to/web-app/root/ path=/foo-app ... /
  context docBase=/some/other/path path=/images /
/host
I think this syntax would confuse Tomcat. I thought only one context 
tag is allowed ...? I could be wrong.
No, you can have as many contexts as you like...
-Dave
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: I've officially decided that JSTL is one of the worst things to ever happen to mankind

2004-07-06 Thread David Rees
Ivan Jouikov wrote, On 7/4/2004 1:04 PM:
1.  JSTL and EL are inefficient.  Tests on similar pages clearly showed
that.  (compare - ${name} with %=name%, run in a loop 1 times,
you-?ll see the difference)
Sure it will be slower, it is really java classes under the hood trying to
hide complexity of scriptlet code. Is that a bad thing? Not really, helper
classes a great, we create them to handle business logic, why not more for
view components. The latest hardware is getting less expensive so I do not
feel this argument holds (especially with the new 64 bit processers and
DDR memory).
You don't feel this argument holds? When you have a poor little 
tomcat running 100 different web applications with 10,000 clicks/day
on each, it DOES become an issue. Your choice: get a new server, OR
replace all the ${} with %=%. I've been faced with similar
situation many times, and trust me, it drives you nuts.
Heh, I was recently faced with a similar decision.  One page coded with 
scriptlets and a few nested for loops was replaced with JSTL and 
c:forEach/, unfortunately CPU utilization and page response times went 
up about 10x, from .5 seconds to 5+ seconds which is unacceptable.

Took me a while to figure out why the page had started responding 
slowly.  Then I replaced JSTL tags with scriptlets with timers around 
the loops and watched page load times go down significantly.

I would like to use JSTL as I do find it a lot easier to read than 
scriptlets, but in this case the performance hit was unbearable.  Maybe 
when I can get the go-ahead for some faster hardware the performance hit 
will be negligible.

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


Re: Content compression in Tomcat

2004-07-01 Thread David Rees
Gabi wrote:
 I'm trying to compress the served jsp.
 As I'm using Apache 2 + Tomcat 4 + mod_jk, I suppose I can use mod_gzip
 apache module, but this have some problems (I'll use SSL in apache too,
 and
 mod_ssl+mod_gzip does not work very well in combination) so I wonder how
 with my configuration can I configure tomcat to compress the generated
 jsp.
 Is there some kind of directive or filter or something to do this? Is it
 possible?
 How can I do it? (I'm a newbie so please explain me what and where I've to
 configure?

There is a compression filter in Tomcat which you can use, but if you can
upgrade to Apache2, you can then use mod_deflate which I find works very
well (and integrates perfectly with SSL content as well).

-Dave



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



Re: development/production configuration for JSPs

2004-06-26 Thread David Rees
I would suggest leaving reloading set to true, but yes you can put it in 
 $CATALINA_HOME/conf/web.xml for JspServlet.

-Dave
Emerson Cargnin wrote, On 6/25/2004 10:27 AM:
a simple yes/no will be enough...
Emerson Cargnin wrote:
May I set the following in the web.xml of the CATALINA_HOME/conf ??? 
Instead of put this in every application???

init-param
param-namedevelopment/param-name
param-valuefalse/param-value
/init-param
init-param
param-namereloading/param-name
param-valuefalse/param-value
/init-param
init-param
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: high server load

2004-06-16 Thread David Rees
Jouko Johansson wrote:
 I configured the fork-setting to true and the load went down from 10 to
 1.5 so the configuration helped a lot.  Also the
 server availibility was enhanced.  Is there still another configuration
 parameter which could decrease the load under 1.0 or do
 we need to buy better hardware ;)

Why did you disable tag pooling? enablePooling is enabled by default.  Did
you try enabling it?  In addition, what happens if you set development to
false?

servlet
servlet-namejsp/servlet-name
servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
init-param
param-namelogVerbosityLevel/param-name
param-valueWARNING/param-value
/init-param
init-param
param-namefork/param-name
param-valuetrue/param-value
/init-param
init-param
param-namedevelopment/param-name
param-valuefalse/param-value
/init-param
load-on-startup3/load-on-startup
/servlet

-Dave


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



Re: Tomcat5/mod_jk Memory Leak/mod_jk bypass

2004-06-02 Thread David Rees
Michiel Toneman wrote, On 6/2/2004 2:18 AM:
I can confirm that this works with mod_jk too.
I'm a little surprised that fixing this rather horrible memory leak 
doesn't appear to be a high priority.  We were almost at a point of 
abandoning Tomcat altogether since we couldn't keep our test environment 
running for more than 2 days without OutOfMemory problems while it would 
run for weeks on end with JRun3. Adding this line made all our problems 
go away, and we are now well on our way to completing our migration to 
Tomcat.
This particular issue has been fixed in Tomcat 5.0.x already.  Please 
download the latest release.

As the thread starter James mentioned, his memory leak problem was not 
because of this issue as he is running the latest, 5.0.25.

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


RE: [ANN] Apache Tomcat 5.0.24 Stable released

2004-05-14 Thread David Rees
Shapira, Yoav wrote:

 The changelog is where it's always been since we've started publishing
 it, on the front page of the docs, in the left-hand navigation bar, near
 the bottom.  Since your search skills are clearly lacking, here's a
 direct URL:
 http://jakarta.apache.org/tomcat/tomcat-5.0-doc/changelog.html.

The change log used (it still is in TC 4) to be included in the
RELEASE-NOTES file which I thought was also a decent place to have it... 
How about adding a note to the RELEASE-NOTES file to look in the
webapps/tomcat-docs/changelog.html file or something as it seems
appropriate to at least reference the changes from the last release in the
release notes.

-Dave

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



Re: mod_jk 1.2.6

2004-04-14 Thread David Rees
Krause Karin wrote, On 4/14/2004 5:19 AM:
does anybody know from where I can get mod_jk in version 1.2.6? I found only
binaries and sources for version 1.2.5.
Or does anybody know which CVS tag I must use to check out this version?
Version 1.2.6 has not been released yet.  If you want the latest code, 
you can grab HEAD out of cvs.

-Dave

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


Re: Request parameters getting lost

2004-04-13 Thread David Rees
Frank W. Zammetti wrote, On 4/12/2004 4:50 PM:
So, my question is twofold... One, has anyone ever seen such an issue as
missing parameters before, and if so, what information can you share with me
about it?  Two, am I off my rocker to think that connector config is way out
of wack, and assuming it is, what suggestions would you guys have to fix it,
given the approximate load I've stated here?
Let me guess, you're using SSL, have keep-alive enabled, and are using 
MSIE with all the latest patches.  Right?

Turns out a patch released by MS around Feb 4 (KB832894) which causes 
MSIE to lose request parameters if the KeepAlive session expires, in 
other words, when the server drops the connection.

The fix is to either tell your users to use a different browser (like 
Mozilla) or to disable KeepAlive under SSL for all MSIE browsers.

See 
http://www.icdevgroup.org/pipermail/interchange-users/2004-February/037840.html

-Dave

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


Re: Request parameters getting lost

2004-04-13 Thread David Rees
David Rees wrote:

 Let me guess, you're using SSL, have keep-alive enabled, and are using
 MSIE with all the latest patches.  Right?

 Turns out a patch released by MS around Feb 4 (KB832894) which causes
 MSIE to lose request parameters if the KeepAlive session expires, in
 other words, when the server drops the connection.

 The fix is to either tell your users to use a different browser (like
 Mozilla) or to disable KeepAlive under SSL for all MSIE browsers.

Looks like Microsoft released a patch today to fix the above bug.  See:
http://support.microsoft.com/default.aspx?kbid=831167

-Dave

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



Re: Tomcat performance issue?

2004-04-12 Thread David Rees
Daniel Gibby wrote:

 Tomcat config:
 Connector
 className=org.apache.catalina.connector.http.HttpConnector
port=8080 minProcessors=5 maxProcessors=255
enableLookups=true redirectPort=8443
acceptCount=100 debug=0 connectionTimeout=6/

 Hey, I just realized something... I think I have been having lockups
 around every 16 hours... 6 seconds! So what does that mean about
 this configuration?

connectionTimeout is defined in milliseconds, not seconds, so that is 60
seconds, not 16 hours.

 Is some servlet not returning content but hanging on to a connection?

Could be, or could be that your server is really busy.  When you look at
the server-status through Apache, does it show 255 processes busy as well?

 Could you explain a little further about 'bug in a servlet causing it to
 not return'?

You could either have a deadlock (synchronization issue) in your code, or
an infinite loop.

 I have a stack trace, but I don't see how that helps me figure out where
 my problem might be... I'm not sure what exactly to look for.

Compress it and post it to the list or put it on a public webserver so we
can take a look.

Cheers

Dave

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



Re: Tomcat performance issue?

2004-04-10 Thread David Rees
Denise Mangano wrote, On 4/9/2004 10:05 PM:
 
I've tried searching the archives but have come up empty-handed.  A few
days ago I received a few complaints that my users hit a certain point
in the application and could go no further.  This point was when Apache
gives control to Tomcat.  I checked the log and found this.
 
Apr 4, 2004 2:19:43 PM org.apache.tomcat.util.threads.ThreadPool logFull
SEVERE: All threads (75) are currently busy, waiting. Increase
maxThreads (75) or check the servlet status
 
The only thing that did the trick was restarting Tomcat and Apache.  Any
ideas on what these errors mean?
Like the messages say, all Tomcat threads are busy and you've hit the 
maximum number of threads which can be processed concurrently.  Sounds 
like you've got either a bug in a servlet causing it to not return, or 
your server is simply overloaded.  You can get a stack trace from the 
JVM to help debug this issue pretty easily.

-Dave

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


Re: Issues in tomcat 5.0.19

2004-04-07 Thread David Rees
Carl Olivier wrote, On 4/6/2004 10:30 AM:
Could the problem be that too many high processor-requirement threads are
being started, and as such each gets less time on the processor - thus
taking longer to process..and thus, should we not set the AJP worker
maxThreads DOWN thus allowing the processor to finish each processor
intensive task quicker?  Maybe set the acceptCount up.hmmm  - thoughts?
I think you've found the problem.  If you have a page which takes 10s to 
process (and you say that it's CPU bound, not IO bound), once you have 
as many threads running as you have CPUs on your server, that 10s is 
goint to start taking a longer.  You said your server was a single CPU 
machine, so if you're running 2 concurrent threads, now it will take 20s 
per request to process.

There isn't much you can do.  You need to limit the number of concurrent 
requests so that at maximum load, your slow page takes a reasonable time 
to complete.  Once you hit that limit you either need to start queueing 
requests or rejecting them.  If you don't, the server will just bog 
further and further down.  Once you get more than 10 or so CPU hogging 
threads going at a time, performance will really start to degrade and 
requests will take longer than 10x to complete than usual due to context 
switching overhead.

You can limit the number of concurrent requests at the connector level 
and then you might want increase the accept count as you suggested.

The next thing you'll want to do is figure out how to turn those 10s 
page requests into 1s or less.  ;-)

-Dave

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


Re: mod_jk leaks file handles on apache graceful restart?

2004-04-06 Thread David Rees
Carcassone France wrote:
 Well, I just extracted 1.2.5 binary from
 jakarta-tomcat-connectors-jk-1.2.5-solaris8-sparc-apache-1.3.28.tar.gz and
 replaced it with my existing mod_jk.so.  (BTW, is there anyway to have
 mod_jk out its version number?  I didn't see any version info in
 mod_jk.log even with debug log level.  After stopping and restarting
 httpd, my test script shows that it's still chewing up fd's on httpd
 restart:

Run strings on your binary and grep for 1.2 `strings mod_jk.so | grep
1.2`.  The other way is to look at the output of mod_status (commonly
accessible at http://example.com/server-status)

On Apache 2.0.49, mod_jk does not leak any file descriptors on graceful or
restarts.

-Dave

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



Re: A couple of performance related questions

2004-04-03 Thread David Rees
Randy Paries wrote, On 4/3/2004 9:57 AM:
1) Is there any advantages/disadvantage to using mod_jk2 instead of mod_jk?
Not really from my point of view.

2) has anyone used Jikes and seen a noticeable difference?
It compiles faster, which is good if you have a slow machine and/or 
don't precompile your JSPs.  Performance is the same once compiled.

-Dave

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


Re: Possible thread crossing

2004-03-25 Thread David Rees
Denise Mangano wrote, On 3/25/2004 8:04 AM:
If the form data is not valid it calls Retry.jsp which I have tried two
ways:
1) input type=hidden name=serialNumber
value=%=formValidator.getSerialNumber()%
2) input type=hidden name=serialNumber value=123456789
If the form data is completely valid then Verify.jsp is called.
Verify.jsp just retrieves the form data (not the serialNumber) and
displays it to the user.  Nothing can be changed on this screen and when
the user clicks submit the data is taken from the instance of
Validator.java and sent of for processing.  The user does have the
option to go back and make changes which brings them to the previous
page.
One thing to note.  On Retry.jsp up until yesterday I had the first way
in the jsp page.  I changed this yesterday to make sure it was hard
coded from all possible change points and so far since then no
transactions have crossed over - but it is still a little too early to
tell since these crossings were random and not happening everyday.
I would guess that your formValidator class com.beans.clients.Validator 
may have some issues based on the behavior you've described.

-Dave

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


Re: Possible thread crossing

2004-03-25 Thread David Rees
Denise Mangano wrote, On 3/25/2004 8:45 AM:
It would appear so, but the strange thing is that I have been using the
same program since July of last year.  I recently rebuilt my server and
changed versions of RH, Apache and Tomcat - but my web pages and java
programs were all restored from back up. This is what's boggling my mind
- nothing has changed in my application itself and this just started
happening a few weeks ago...
This is a wild stab in the dark, but are you using SSL?

-Dave

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


RE: Possible thread crossing

2004-03-25 Thread David Rees
Denise Mangano wrote:
 For the life of me I cannot recall why I made them static!!!  There are
 a few other variables that I had static as well.  I want to say that
 when I was writing the program I was getting compile errors stating that
 I cannot reference non-static variables and changing them to static
 allowed the program to compile (major newbie mistake/assumption I am
 sure).

It's a common mistake to make.

 I just created a copy of my program and removed static from the
 serialNumber as well as a few other variables I had made static and
 everything compiled fine.  Very strange though that it has been working
 fine this entire time??? :-/ I guess the next step is to make this
 change in the live program and monitor it very closely...

It will appear to work fine under light testing or light load scenarios. 
Once load increases or requests happen to come in at the same time these
types of concurrency issues will show up.

-Dave

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



Re: What are you using for Failover Notification? (mod_jk)

2004-03-23 Thread David Rees
Clute, Andrew wrote, On 3/23/2004 7:02 AM:
It seems to me the one large missing component of the mod_jk* connectors
is notification of a failover -- either via email, pager, etc.
I am sure there are people that are using mod_jk in production with a
cluster and have a solution for being notified with a Tomcat instances
goes down, via either scripts, or some other component. I would love to
get some pointers on what is available in the market. A search didn't
seem to turn up much.
This is probably overkill if all you are monitoring is a few Tomcat 
instances, but I've found Nagios to work very well.

http://www.nagios.org/

-Dave

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


Re: Possible thread crossing

2004-03-23 Thread David Rees
Denise Mangano wrote, On 3/23/2004 9:01 PM:
I just wanted to point out again that this data appears to be getting
crossed only with the clients that have the highest volume This is
why I am thinking it's a java/Tomcat issue.  Perhaps my java isn't using
enough memory? (old-newbie guess?)  How would I check something like
that, and if it is too low how do I increase it?
As Nix mentioned earlier, I suspect that you have a static variable (or 
shared scope variable) which gets stepped on by other threads when load 
gets high.  It is highly unlikely it's a Java/Tomcat issue, and highly 
likely it's a web app bug.

-Dave

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


RE: Problem with the memory of the tomcat

2004-03-19 Thread David Rees
Mike Millson wrote:
 On Fri, 2004-03-19 at 15:23, Shapira, Yoav wrote:
 Top on linux shows java threads as OS-level processes, which is wrong.

 Is this true even on RedHat Linux 9 and RHEL 3, which use NPTL (native
 posix thread library)? Tomcat shows up as 1 thread with top, and if I
 remember correctly, prior to RHL 9, it showed up as multiple threads.

At least on Fedora Core 1 using ps or top to view threaded processes only
shows one process.  There are options for both programs to display
individual threads.  I assume it would be the same for any RH which uses
NPTL.

-Dave

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



Re: Broken pipe... PART 2...

2004-03-19 Thread David Rees
Chris Boyce wrote:

 Just to add my own observations... I can push over our test
 environment simply by hitting refresh (rapidly) for our front page,
 which does contain some SQL queries.  By just one browser continuously
 interrupting the connections with refresh, I can watch the Java
 process in top climb over 80% CPU and the site becomes unresponsive.

Can you send Tomcat a QUIT signal so that you can get a stack trace and
see what all the Tomcat threads are doing?  Does Tomcat eventually recover
if you let it sit a while?

-Dave

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



Re: Problem using Tomcat with mod_rewrite.

2004-03-16 Thread David Rees
Axel Scheel wrote, On 3/16/2004 6:34 AM:
Hi,
we are using a slightly old tomcat 3.2.4 with apache 1.3.29 under Gentoo 
Linux and have a problem rewriting URLs like:

So i think the problem is that the request is first taken by mod_jk 
before it is passed to mod_rewrite but i don't see any solution to that.

The most strange thing, the same configuration works fine with tomcat 
3.2.4 with apache 1.3.28.
Can you check that mod_jk appears last in the loadmodules section of 
your httpd.conf?  Order is important there...  The other possibility is 
that you're using a different version of mod_jk, if you can, try 
compiling 1.2.5 for your setup to make sure you're running a recent version.

-Dave

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


Re: Problem using Tomcat with mod_rewrite.

2004-03-16 Thread David Rees
Axel Scheel wrote:
 The mod_jk was at the end of the LoadModule section. I tried around a
 little with the order and finaly it works if the mod_jk is located
 beween the mod_alias and the mod_rewrite. So the end of the load modules
 list looks like:

 LoadModule alias_module   modules/mod_alias.so
 LoadModule jk_module  extramodules/mod_jk.so
 LoadModule rewrite_module modules/mod_rewrite.so

 Thanks for the hint with the order

Ah, that's right, it needs to before mod_rewrite, I got mixed up.  ;-)

-Dave

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



Re: Load balancing for uptime

2004-03-15 Thread David Rees
Derek Clarkson wrote, On 3/15/2004 10:32 PM:
We have an app written in a mix of JSP, servlets and struts across 3
instances of apache, tomcat and an RMI server. To say that it's a pile of
smelly stuff is an understatement, however it works (mostly) and our
customers depend on it. At least once a week though it crashes with out of
memory errors. 

Until we can redesign and fix it we are looking for a way to keep it up. One
suggest has been to have two servers running with a common DB server, and to
use a load balancer to allow us to keep one server up whilst we boot the
other, then vice versa. Thus on a daily basis we can reboot both machines
whilst mainting a working system for the users. 

Can anyone see any problems with this ? I'm concerned about issue realed to
session management, etc.
I've had good luck using Apache and mod_jk configured with sticky 
sessions used to load-balance across multiple Tomcats.  Works great. 
With Tomcat 5.0 you can do session replication so that you can even lose 
a Tomcat instance without missing a beat.

-Dave

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


Re: How can I get a method to be called every 60 seconds in Tomcat?

2004-03-15 Thread David Rees
tom ly wrote, On 3/15/2004 7:01 PM:
I want to get a method to automatically get called every 60 seconds
in Tomcat.  The method reset() will reset monitoring information.
How can I do this?
Jcrontab - http://jcrontab.sourceforge.net/

-Dave

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


Re: Setting HTTP headers for static resources?

2004-03-14 Thread David Rees
Andreas Schildbach wrote, On 3/14/2004 12:48 PM:
is there an easy way to set HTTP headers (specific: cache-control) in 
Tomcat 5 for static resources like CSS files or GIF pictures?

By default, Tomcat does not seem to touch these headers.

I know that I can set headers from Servlets/JSPs, but that does not help 
in the case of static resources.
You can write a Servlet Filter to do this.  I am also unaware of any way 
to do this within Tomcat itself.

-Dave

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


Re: Is this normal? JK2: ajp13 listening on /0.0.0.0:8009.

2004-03-13 Thread David Rees
Galam wrote, On 3/12/2004 11:18 PM:
Is the message  JK2:  ajp13 listening on /0.0.0.0:8009 normal?  Why
the ip address is all 0's?
When listening on 0.0.0.0, that means that you are listening on all 
available TCP/IP addresses, and in this case port 8009.  So yes, it is 
normal.

-Dave

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


Re: JK Connector SYN packet for established connection

2004-03-12 Thread David Rees
Antonio Fiol BonnĂ­n wrote, On 3/11/2004 11:11 PM:
Tomcat will
detect the closed connection and return that JK thread back to the pool
for later use.
It won't. If the firewall has already dropped the connection, Tomcat 
will not notice it being closed.
OK, so if the conn is dropped, TC won't know what to do with it as it 
will sit there and wait forever for input.  I can't find any options in 
the JK connectors to change the behavior of the server... The easy 
solution should be to add an option to enable keep alive on the server 
side as well.

And as I said (and sources seem to agree with me ;-), socket_timeout is 
only checked synchronously, i.e. at usage time. So, maybe 
socket_timeout=10, but you may have connections staying up for ... as 
long as a whole night of deep inactivity.
Good point, I did not think of that.

In the morning, if you netstat on both machines, you will see a 
different number of ESTABLISHED connections. You will have more of them 
in the Tomcat side. And that is not good. Add up some nights, and you 
will have to restart your tomcat server in a couple of days / a week / a 
couple of weeks, depending on your MaxSpareClients (or equivalent) in 
your web server and your maxProcessors / maxThreads in Tomcat.
Yeah, that's not good.  Although it's better than having the server get 
stuck after only a few minutes of idle time.  ;-)

-Dave

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


RE: JK Connector SYN packet for established connection

2004-03-11 Thread David Rees
CONANT,PATRICK (HP-FtCollins,ex1) wrote:
 Thanks for the proposal.  We made the change, but to no avail.  When the
 IIS server came back up, we saw the same problem start almost immediately.

 The only other report of this problem I could find was for a different
 product (http://www.firewall-1.org/2002-04/msg00180.html).  I don't think
 that the cause could be the same: with the amount of traffic we're seeing,
 the JK connections should just remain open.  Regardless, our firewall
 admin refuses to change the tcptimeout (as suggested in the above link)
 due to potential impacts on other applications.

 Any other ideas?

Could you try setting the socket_timeout to an even lower value?  Say 30s
instead of 300?

worker.frontend.socket_timeout=30

-Dave

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



Re: JK Connector SYN packet for established connection

2004-03-11 Thread David Rees
Antonio Fiol BonnĂ­n wrote:
 That won't help.

I think it will, see below.

 socket_timeout tells Apache to CLOSE connections that have been unused
 for that time, but only WHEN it needs it.

 So that will cause problems on the Tomcat side.

Why will it cause problems on the Tomcat side?

IMO, it has a good chance of fixing the problem as Apache/mod_jk will open
a new connection if it hasn't been used for a while which should prevent
the SYN problem the original poster was having problems with.  Tomcat will
detect the closed connection and return that JK thread back to the pool
for later use.

Even if it doesn't help, it's an easy change to try.

-Dave

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



Re: JK Connector SYN packet for established connection

2004-03-10 Thread David Rees
CONANT,PATRICK (HP-FtCollins,ex1) wrote, On 3/10/2004 7:58 AM:
Our workers.properties file is pretty simple:
worker.list=frontend
worker.frontend.host=X.XXX.hp.com
worker.frontend.type=ajp13
worker.frontend.port=8007
Try setting the socket_keepalive and socket_timeout options and see if 
that helps:
worker.frontend.socket_keepalive=1
worker.frontend.socket_timeout=300

-Dave

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


Re: clustering question?

2004-03-09 Thread David Rees
Alex wrote, On 3/9/2004 10:26 PM:
thanks for the reply.  I do indeed have that tag in web.xml for that
web application.
  session-config
 session-timeout40/session-timeout
  /session-config
  distributable/
   /web-app
this is correct, yes?
The distributable element should go before any context-param elements 
and after any description elements.

See the DTD for the correct order of elements in the web.xml file.

http://java.sun.com/j2ee/dtds/web-app_2_2.dtd
http://java.sun.com/dtd/web-app_2_3.dtd
-Dave

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


Re: What's the problem with Tomcat 4.1.29 and Switch?

2004-02-24 Thread David Rees
Ralph Einfeldt wrote, On 2/24/2004 12:41 AM:

No, the first solution should't work:

% break; %
% case 2: %
You're right, missed that one.  Anyway, the original poster should get 
the idea. ;-)

However, I prefer the JSTL solution.
(But can't use it, a we still use JSP 1.0)
JSP 1.0???

Even TC 3.3.1a supports JSP 1.1 and TC 4.1.30 supports JSP 1.2.

-Dave

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


Re: What's the problem with Tomcat 4.1.29 and Switch?

2004-02-23 Thread David Rees
Thanks.  I wish Damon Hougland and Aaron Tavistock knew that before they
published their Sun sanctioned book.  It would have saved me a lot of
frustration.  I really expected Sun's CORE books to be better then Wrox.
Their example was this which failed:

% switch (day) { %
% case 1: %
   font color=blue size=+1Sunday/font
   % break; %
% case 2: %
   font color=blue size=+1Monday/font
   % break; %
% default: %
   font color=blue size=+1No day/font
   % break; %
% } %
If you want to use a switch, this should work:

% switch (day) {
   case 1: %
   font color=blue size=+1Sunday/font
   % break; %
% case 2: %
   font color=blue size=+1Monday/font
   % break; %
% default: %
   font color=blue size=+1No day/font
   % break; } %
But really, the best way to do it is to use JSTL instead of scriptlets 
like this:

c:choose
  c:when test=${day == 1}
font color=blue size=+1Sunday/font
  /c:when
  c:when test=${day == 2}
font color=blue size=+1Monday/font
  /c:when
  c:otherwise
font color=blue size=+1No day/font
  /c:otherwise
/c:choose
Much more readable, too.

-Dave

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


Re: Tomcat hot reload

2004-02-18 Thread David Rees
Rigmor wrote, On 2/18/2004 11:01 PM:
I have following setup: Tomcat 5.0.18 and Apache web server, we use
jk2 to connect them.
The problem is that when using Manager reload Ant task, servlet is
offline (404, not available blah blah) for a few seconds. Is there
any way to configurate ajp or/and jk2 that requests are held in some
queue if context is in reloading state and then process them?
You will need to have at least two Tomcat's running, load-balanced using 
mod_jk along with session replication.

At that point, you can modify your mod_jk config to disable one Tomcat 
instance, reload that instance, then disable the other Tomcat and reload.

There is a bug open for this as well as a lengthy discussion in the 
archives: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25596

-Dave

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


Re: thread dump analysis

2004-02-17 Thread David Rees
On Tue, February 17, 2004 at 9:20 am, Daniel Gibby wrote:

 I did a kill -3 on the process that showed up on top and got a stack
 trace... the problem is I have no idea how to analyze the thread dump to
 see what is consuming CPU.
 I'm sure something must be spinning its wheels, but I don't know how to
 tell... I can just see that when I run top my tomcat process has 99.9 %
 of the CPU and the load average is 8.00 8.00 8.00

snip

 I'm hoping that someone can tell me what to include and what to exclude
 and I'll reply with the appropriate parts of the dump.

Best to just post the entire dump somewhere on the web where everyone can
look at it.  Sounds like something somewhere is getting threads stuck in a
loop, should be pretty easy to spot if you get the dump during a non-busy
time.

Not sure how big of an attachment the list will accept, but you might be
able to compress it and attach it to the list.

If it's too big, just send it to me privately and I will have a look.

-Dave

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



Re: thread dump analysis

2004-02-17 Thread David Rees
On Tue, February 17, 2004 1at 2:04 pm, Daniel Gibby wrote:
 Well, I'd rather not show the world what my java processes are doing in
 case there is something proprietary in there.

 I'll send it to you personally.

OK, but it's tough for people to help troubleshoot your issue unless you
do so.  ;-)

-Dave

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



Re: thread dump analysis

2004-02-17 Thread David Rees
David Rees wrote, On 2/17/2004 12:43 PM:

On Tue, February 17, 2004 1at 2:04 pm, Daniel Gibby wrote:

Well, I'd rather not show the world what my java processes are doing in
case there is something proprietary in there.
I'll send it to you personally.
OK, but it's tough for people to help troubleshoot your issue unless you
do so.  ;-)
I had a look at Daniel's thread dump, it did not appear to be an issue 
with Tomcat, but rather an issue with either some jcrontab threads or a 
JVM/OS issue as he is running the IBM 1.4.1 JDK on a stock RH 8 system.

-Dave

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


Re: Workaround for JK Bug

2004-02-13 Thread David Rees
On Fri, February 13, 2004 1at 1:03 am, Chris Pennock wrote:

 I have recently encountered a bug in the interaction between mod_jk and
 Tomcat. In brief, Tomcat does not get the POST data from mod_jk following
 failover from one Tomacat node to another.

 Also, here is a link to the bug in Apache's Bugzilla:
 http://issues.apache.org/bugzilla/show_bug.cgi?id=24882

It's should be fixed in CVS.  Try pulling the latest code and see if it
fixes it for you and post your results in the bug, the developers would
love to hear about it.

-Dave

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



Re: Workaround for JK Bug

2004-02-13 Thread David Rees
On Fri, February 13, 2004 1at 1:21 am, Thomas Tang wrote:
 Is this issue only in the binary release or all releases?

 I have jk 1.2.4 with apache 1.3.29 compiled from source on solaris but
 have not observed this problem.

It's in all releases besides current CVS.  The bug isn't that easy to
trigger which is why it's gone un-fixed for some time.

-Dave

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



Re: Workaround for JK Bug

2004-02-13 Thread David Rees
On Fri, February 13, 2004 1at 1:23 am, Apu Shah wrote:

 i was wondering what the state of the checked in code is for mod_jk. the
last tag on jk was 1.2.5 after which (i assume) there have been several
checkins.

 would you recommend pushing out a cvs built mod_jk to production
(probably
 unsafe, right) or should we wait for the next tagged, jakarta-blessed,
deemed stable mod_jk?

 (i guess i answered my question... any thoughts, gut-feelings,
 recommendations anyone?)

mod_jk2 is due to be tagged for a release in the next week or so.  mod_jk
is due to be tagged the week after mod_jk2 is released.  If you are
affected by the POST bug in mod_jk, then I would consider using CVS after
testing it yourself, otherwise I would just wait.

-Dave




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



Re: done did not found a worker

2004-02-10 Thread David Rees
Nicholas Bernstein wrote, On 2/9/2004 6:26 PM:
if you've got a minute, take a look @ the configs I posted 
http://nicholasbernstein.com/tomcat/

and let me know if you see anything wrong with the setup. I'd rather
stick to apache2; i'm using redhat ES and it looks like they've made a
lot of RH specific patches to httpd source, so it probably performs a
lot better that compiling 1.x from source. 
It looks like you're trying to use mod_jk with a mod_jk2 configuration 
file.  The configuration files are NOT the same between the two modules.

-Dave

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


Re: done did not found a worker

2004-02-10 Thread David Rees
Dwayne Ghant wrote, On 2/9/2004 7:02 PM:

Dave, I have been having semular issues would it be impossible for to 
post the four files listed below:

1. http.conf
2. ssl.conf
3. server.xml
4. workers2.properties
Here's a sample for setting up Apache.  This will work on either Apache 
2.0.X or Apache 1.3.X, and mod_jk 1.2.5.  Any version of Tomcat will 
work, use the example connector config included with every default 
server.xml as it varies a little between Tomcat versions.

httpd.conf
# This only shows the portions relevant to mod_jk, you should stick the
# lines somewhere in your config file.  This config also works for
# Apache 1.3.X as well as Apache 2.0.X.
---
LoadModule jk_module modules/mod_jk.so
JkWorkersFile path-to-apache-conf/tomcat_workers.properties
JkLogFile path-to-apache-logs/mod_jk.log
JkLogLevel error
VirtualHost *:80
ServerName www.example.com
JkMount /*.jsp tomcat
JkMount /servlet/* tomcat
/VirtualHost
---
path-to-apache-conf/tomcat_workers.properties
---
worker.list=tomcat
worker.tomcat.port=8007
worker.tomcat.host=localhost
worker.tomcat.type=ajp13
---
That's it!

-Dave
 aka the mod_jk expert
 NOT a mod_jk2 expert!
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: done did not found a worker

2004-02-10 Thread David Rees
All that stuff below is related to mod_jk2, which I am definitely NOT an 
expert as noted in my previous email.  Hope someone else can help you.

-Dave

Dwayne Ghant wrote, On 2/10/2004 8:58 AM:
But Dave you didn't address this stuff below?
I think this is where I'm having the most problems.
##=
##Other needed configuratoin(s)
##=
##define the shared memory file
[shm]
file=/usr/local/tomcat-4.1.24/work/jk2.shm
file=1048576
## Define the communication channel
snip

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


Re: Native application from servlet (java.net.SocketException: Connection reset by peer: socket write error)

2004-02-10 Thread David Rees
Veselin Kovacevic wrote, On 2/10/2004 2:14 AM:
 
We have a servlet based application which open a native application and
read some output from them.
Sometimes we get an error in tomcat logfile but application work fine. 
 
Here is error. Any ideas what is possible problem?
Looks normal.  Appears to be that someone pushed stopped in their 
browser which closed Tomcat's output stream to the user.

-Dave

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


Re: done did not found a worker

2004-02-09 Thread David Rees
On Mon, February 9, 2004 at 4:41 pm, Charles Daniel wrote:

 Give up trying to use Apache2 with mod_jk.  After spending days on the
 message boards trying to solve this one, I was ultimately told by the
 so-called experts that  I had a network configuration problem and that
 some process was likely to be either already using or blocking port 8009.

Hmm, I've had no problems at all using mod_jk with Apache2 on both various
Linux and SGI Irix machines.  I must be a so-called expert.  ;-)

-Dave

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



Re: Do the tomcat developers use bugzilla?

2004-02-05 Thread David Rees
Josh Rehman wrote, On 2/4/2004 10:21 PM:

At first I was shocked that TC5 has only 15 bugs registered. Then I 
looked at the TC4 bugs: only 647, and almost all of them new.

Should I bother filing any more bugs? Are the TC developers using 
another bug system? Are they using any bug system? Speaking of which, 
who *is* developing Tomcat these days?
You really should have a look at the -dev list.  BTW, I found 598 bugs 
in various states for TC5, and 3284 bugs in various states for TC4.

The main reason you see a lot of open bugs for TC4 is because there is a 
LOT more users using TC4, and not many developers working on TC4 
anymore.  It takes a lot of time to wade through those bug reports, 
validate them and do the appropriate thing.

You make it sound like Tomcat developers aren't doing anything, when in 
fact they are working very hard.

-Dave

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


Re: Tomcat Loads Deleted Context?

2004-02-05 Thread David Rees
Remy Maucherat wrote, On 2/5/2004 1:32 AM:

What I recommend with TC 5 is put your context declarations in 
/META-INF/context.xml, and use the manager to manage your webapps. If 
using external contexts, then it's the similar: either use the manager 
webapp or drop your context file in the right subdir of conf (and use 
the manager to undeploy).
Remy, this sums up how users are expected to manage contexts with TC5 
quite nicely.  Can you stick this comment in the server.xml so that 
unsuspecting users upgrading from TC4 aren't caught off guard by this? 
I briefly looked through the TC5 docs on the site and couldn't find any 
reference to this change in behavior there, either.

IMO, this change is is very important and should be noted somewhere 
prominent as a TC4-TC5 upgrade note/gotcha.  It had me baffled for a 
while, too, now I modified my startup script to `rm -rf conf/Catalina` 
every time so I don't get caught with any webapps I forgot about as I am 
used to doing all my context management through the conf/server.xml.

This and the change in web-app reloading now causes requests to fail in 
between the shutdown-startup phase instead of blocking are two 
significant non-obvious changes in behavior of managing a TC server 
between TC4/5.

-Dave

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


Re: mod_jk as a load balancer - Am I missing something obvious?

2004-02-04 Thread David Rees
On Wed, February 4, 2004 1at 1:31 am, Antonio Fiol BonnĂ­n wrote:
 Am I missing something very obvious?

 Do jvmRoutes need to have the same name as the workers? I find that
 strange, but I can't come up with something more logical...

Yes, they do.

-Dave

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



Re: mod_jk and virtual folders?

2004-02-04 Thread David Rees
On Wed, February 4, 2004 1at 2:02 pm, Tim Diez wrote:

 I'd like to use apache and mod_jk to dynamically re-route all subfolders
 of my httpd web server to a single Tomcat webapp.

 http://www.myserver.com/
 http://www.myserver.com:8080/mywebapp

 The tricky part for me has been setting this up to be dynamically
 routed.  What I'd like to do is have myserver.com/anyfolder route to
 myserver:8080/mywebapp, so I don't have to create a virtual host for
 every potential subfolder on myserver.com:80/

 So, I need http://www.myserver.com/*/hello.do?param=nada to map to
 http://www.myserver.com:8080/mywebapp/hello.do?param=nada

 I need the url to always keep the original host/folder.  I tried
 mod_rewrite, but it changes the URL after the redirection.  If I use
 mod_jk any folders off of the default port 80 server have to co-exist as
 a webapp under tomcat(as far as I know).

You'll have to use mod_rewrite for this, and you'll have to make sure that
you're using internal redirects (or forwards) instead of exernal
redirects.  This will require that you have mod_proxy installed as well.

So something like this may work:

RewriteEngine on
RewriteRule ^/(.*)/(.*)$  http://www.myserver.com:8080/$2 [P,L]

What rewrite config did you try before?

-Dave

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



Re: multiple apache instances load balancing tomcat

2004-02-03 Thread David Rees
Pete Stokes wrote, On 2/3/2004 8:09 AM:
 [EMAIL PROTECTED] wrote:
 For redundancy in apache the following options are open to you :
 1) Use a http sprayer in front of the apache webservers
 2) Use a load balancing software such as Stonebeat Webcluster
 3) Manual failover. This is where you have two instances of apache
 configured and running using the same ip, but only have one of the
 up. When your primary node fails down its interface and up the
 secondary.

For point 3, I'd assume that all users would then lose their sessions? 
I'd be after sticky sessions, so I guess I'd need memory-memory 
replication between the two apache's, is this possible?
If you're clustering multiple Tomcats instances with replicated sessions 
on different machines behind multiple Apache instances on different 
machines, if one of the Apache instances dies you won't lose any 
sessions as your Tomcat instances have not been affected.

With TC 5, you don't even need to use sticky sessions if you're using 
session replication, but I would recommend it anyway.

-Dave

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


Re: Tomcat 4.1.27 hotfix - how to install

2004-02-03 Thread David Rees
Jose P. Gisone wrote, On 2/3/2004 5:41 AM:
I would greatly appreciate any tips that would point me in the right
direction.
Instead of applying the hotfix, you should wait a few days and upgrade 
to 4.1.30.

Also, unless you're having any problems with Tomcat, there is no real 
need to apply the hotfix.  IIRC, the hotfix fixes a context reloading bug.

-Dave

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


Re: WHY? Tomcat 5 maxThreads too low, set to 10

2004-02-02 Thread David Rees
On Mon, February 2, 2004 at 2:38 pm, Parris, Edward G wrote:
 I tried a similar configuration on Tomcat 5.0.18 but noticed a ThreadPool
 warning on startup stating that my maxThreads setting was too low and that
 it would be reset to 10.

 WARNING: maxThreads setting (3) too low, set to 10

 Does anyone have any ideas how I can rectify this situation? 10 concurrent
 threads is too many (at peak each heavy-weight can consume ~1GB of
 memory). Simply increasing the memory limits is not going to do it.

10 is the hard-coded minimum set in Tomcat.  You have two choices:

1. Recompile Tomcat 5, lowering the hard-coded minimum.
2. Implement a filter or some other type of synchronization in your
servlet which keeps track of the number of currently executing requests
and redirects the user to a different page with a meta refresh letting
them know that their request is being queued until the other outstanding
requests finish.

-Dave

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



Re: WHY? Tomcat 5 maxThreads too low, set to 10

2004-02-02 Thread David Rees
On Mon, February 2, 2004 at 6:28 pm, Josh Rehman wrote:

 This brings up an interesting point. I'm too lazy to test it, but what
 happens if you tomcat needs more threads than it is allowed? Does the
 user get a 404?

No.  If the acceptCount is set to more than 0, the request will sit in the
accept queue until acceptCount is exceeded at which point the user will
get a connection refused error.

-Dave

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



Re: Load Balancing Problem...Urgent

2004-02-01 Thread David Rees
Kok Wei, Koh wrote, On 2/1/2004 1:33 AM:
Why not go with the latest:-
* apache 1.3.29
I would recommend Apache 2.0.48 myself as it has the mod_deflate module 
which enables gzip compression and can save a LOT of bandwidth as well. 
 I've been using Apache 2 along with mod_jk and load-balanced Tomcats 
with no problems.

-Dave

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


Re: Autoresponers getting subscribed to the list AUTO 'Getty=987-032'Tomcat 5 jpda debugging

2004-01-30 Thread David Rees
Vitor Buitoni wrote, On 1/30/2004 3:50 AM:
Maybe some admin could unsubscribe this annoying guy?
The real question is how are these guys getting subscribed?  It appears 
that someone has figured out a way to subscribe random addresses to the 
list without validation.

I'm guessing that it works because someone spoofs a subscribe request, 
and ezmlm responds to the spoofed address with the confirmation.  These 
autoresponders which include the whole message reply, and voila, they 
have been subscribed to the list.

Need to figure out who is doing this crap and tell people that their 
crappy autoresponders suck.  It could be related to the virus going 
around, I suspect that the scenario goes like this:

* Infected machine sends spoofed email address from 
[EMAIL PROTECTED] to dumb autoresponder
* Auto responder sends message back to 
[EMAIL PROTECTED] (which is a subscription request)
* EZMLM sees subscription request, sends out confirmation to spoofed email.
* Autoresponder at spoofed email address confirms subscription
* tomcat-user subscribers suffer from all the new spoofed emails.

So the process to unsubscribe these buffoons should be obvious now, I'll 
see if  it works.

-Dave

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


Re: Autoresponders getting subscribed to the list AUTO 'Getty=987-032'Tomcat 5 jpda debugging

2004-01-30 Thread David Rees
David Rees wrote, On 1/30/2004 9:37 AM:
So the process to unsubscribe these buffoons should be obvious now, I'll 
see if  it works.
Well, someone already too care of the AUTO 'Getty' autoresponder.

-Dave

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


Re: Tomcat manager reload, start and stop functionality

2004-01-27 Thread David Rees
Quinten Verheyen wrote, On 1/27/2004 12:17 AM:
I use Tomcat 4.1.29, and I have 2 servers running so in case of a
start/stop clustering will definitely be a go ..
Note that under TC 4.x, session clustering isn't officially supported, 
although Filip Hanik has made the clustering software available here as 
an add-on to TC 4:

http://cvs.apache.org/~fhanik/

If your application doesn't use sessions, then you don't need to worry 
about clustering and can just do load balancing.  If you need 
clustering, I recommend using TC 5 where the clustering software is 
actively developed and supported.

-Dave

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


Re: Tomcat manager reload, start and stop functionality

2004-01-26 Thread David Rees
On Mon, January 26, 2004 1at 2:54 am, Quinten Verheyen wrote:

 I have a question about some tasks of the manager app of Tomcat.

 * The Reload-task doesn't stop and start the webapp, but I wonder how it
 exactly works. Because when I am transferring a new jar-file on the server
 and a Reload is run on the context, I need to know how this can affect the
 HTTP requests entering that context at that exact moment the reload is
 running. I know we are talking about less than a sec. here in most
 cases, but imagine thousands and thousands of SMS messages coming in via
 HTTP requests to that context. How is this handled ? With timeout and try
 again ? Please explain this if someone would be so kind ..

 * The second question involves the same matter, but with the stop and
 start task. The context is not active after running the stop (only for a
 very short time but still) so any HTTP request will fail (I guess a 404 or
 something). Is there a way to work around this ? Some kind of delay option
 or something.. to tell that any HTTP request is put into a pool and then
 run again on the context when it is active (after the start). Or are there
 better ways to assure nothing gets lost .. (ps of course using jsp's
 ensures not needing the start and stop, but suppose we're using servlets).

What version of Tomcat are you talking about?

TC 4.1.X handles reloads without dropping any requests, any new requests
that come in during the reload will wait until the context is finished
reloading.

TC 5.0.X replaces the reload function in TC 4 with a stop/start, so it
behaves as you've described in your second scenario above.

To work around this, you will need to cluster multiple Tomcat instances
(at least two).

When it is time to reload a context in one TC instance, you will need to
configure your load balancer to stop sending requests to that instance,
restart that instance, and then reconfigure your load balancer again to
resume sending requests to the TC instance.  You will need to repeat for
each TC instance.

This can be done using Apache/mod_jk as the load balancer.

-Dave

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



Re: bad signature for jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz

2004-01-25 Thread David Rees
Eric Emminger wrote, On 1/24/2004 12:25 PM:
I'm trying to verify the signature of 
jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz, but gpg says public key 
not found. I DID import the KEYS from 
http://www.apache.org/dist/jakarta/tomcat-connectors/KEYS.

Here's the output of the gpg verify command.

$ gpg --verify jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz.asc
gpg: Signature made Wed Nov 27 03:15:54 2002 EST using DSA key ID 881EBC94
gpg: Can't check signature: public key not found
Looks like that is an old key of Mladen Turk, so he probably accidently 
used an old key instead of his new one, or something fishy is going on. 
 Google for 881EBC94 and you'll find his old key.

Better bring this up on the -dev list.

-Dave

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


RE: memory leak in tomcat 5.0.16 ?

2004-01-22 Thread David Rees
On Thu, January 22, 2004 1at 0:25 am, Torstein Nilsen wrote:
 I have now upgraded to the latest tomcat release 5.0.18 but I'm
 afraid this didn't solve the problem - the tomcat-process is still
 growing.

 I have monitored the ressources used very closely with 5.0.18 and it
 shows a slow grow in mem-usage a couple of hours and then suddenly in
 a matter of ca. 10 secs. it goes from 15% to 40% of total memory and
 stays there. Tomcat access log-files doesn't show extrordinary
 activity during the bloat.

Sounds like you're going to need to get a profiler to figure out where the
memory is being used.

-Dave

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



Re: mod_jk load balancing question

2004-01-20 Thread David Rees
Rahul Kuchhal wrote, On 1/19/2004 3:25 PM:
Hi! I have a question about the load balancing
capabilities of JK connector. If this is not the
correct forum to ask this please let me know.
We have been using a single apache load balanced
equally between two Tomcat machines, using JK
connector. Now during load tests on one of the
installation the load is getting distributed evenly
but on another installation (different machines and
different application) the load distribution is very
uneven. It always favors one Tomcat machine over the
other in the ratio of 5:1.
We have checked everything including the load factor
etc. But the Tomcat sessions on one machine is 50 and
on another one they are only 10.
Is there a place where I can get more information
about the load balancing algorithm? Any thing we can
do to figure out why it is behaving in such a way?
This is a known issue with the JK connector.  The problem (as it was 
described to me) is that each Apache process does not communicate with 
the others regarding what tomcat workers it has sent requests to (the 
load balancing information).  This leads to the Apache processes 
choosing the same worker frequenty to do the work.

One work around is to use Apache2's worker MPM which is multi threaded. 
 Threads will share the load-balancing information, so requests will be 
spread out a lot more evenly.  Unfortunately, the threaded MPM isn't 
stable for all workloads so you'll have to test it to see if it works 
for you.

Another work around is to tweak the lbfactor values in your 
workers.properties files until the load is distributed fairly evenly. 
This is process would have to be done through trial and error.

I've looked at the load balancing code in mod_jk, it seems horribly 
complex for what probably should be a rather simple algorithm.  It was 
also designed to have the load-balancing information shared between 
processes, but that portion of the code was never written.  I'm sure the 
developers would welcome patches!  ;-)

-Dave

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


RE: maxProcessors vs maxThreads

2004-01-19 Thread David Rees
On Mon, January 19, 2004 at 1:47 pm, Apu Shah wrote:

 this begs another question... under what circumstances would one choose to
 use the ajp connector? i am assuming it's probably a more compact and
 efficient protocol compared to http (not sure about that).

The AJP protocol is designed to be used for webservers to communicate to
Tomcat.  For example, the mod_jk module for Apache is used to communicate
with Tomcat, it proxies requests from Apache to Tomcat.

-Dave

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



Re: Tomcat, load balancing

2004-01-17 Thread David Rees
Pooleery, Manoj wrote, On 1/17/2004 1:04 AM:
I have a scenario where I have to support 2000 concurrent users on my
 app. What would be the best distribution with Tomcat?
By distribution, do you mean OS?  Linux distributions with NPTL support
would be the way to go because of the enhanced scalabilty of threads
with NPTL support.
Are there any documents/standards as to how many concurrent users 
each instance of Tomcat will be able to support?  Any
suggestions/useful links will be really appreciated.
Not really.  It's too dependant on your application.  You'll have to do 
your own load testing to determine how many Tomcat instances you'll need 
to support your load.

-Dave

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


Re: tomcat 4.1.24 hangs

2004-01-15 Thread David Rees
[EMAIL PROTECTED] wrote, On 1/15/2004 12:54 AM:
I did some investigation and found the following bug report for
tomcat 4.1.24: 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763

Can this explain the problem I have and does anyone knows whether the
bug is solved or under investigation?
I believe the bug was solved in 4.1.27, but might have been 4.1.29. 
Upgrade to 4.1.29 to be safe as there are number of other bugs fixes in 
4.1.29, too.

-Dave

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


Re: How to find the differences between versions?

2004-01-14 Thread David Rees
On Wed, January 14, 2004 at 1:29 pm, Glanville, Jay wrote:
 What is the best way that I can find all the issues that were resolved
 in between 4.1.12 and 4.1.29?  Basically, my manager wants to know if we
 should upgrade to 4.1.29, and he wants to see a list of all the issues
 that were closed since 4.1.12?

You should look at this file called RELEASE-NOTES which is included with
each release of Tomcat.

-Dave

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



Re: Tomcat 4.1.29 versus Tomcat 5

2004-01-13 Thread David Rees
Daniel Gibby wrote, On 1/12/2004 10:51 PM:
Great, I'm sold! OK, so what are the biggest problems there have been in 
upgrading?
What do you mean an app running on 4.x may not work on 5.0.x? Is this 
only because of changes in the JSP spec, and older 1.2 is not compatible 
with the 2.0 spec?
Problems tend to be application related.  The primary issue keeping me 
from trying 5.0 in production is this one as it changes the behavior of 
the manager webapp:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25596

Unfortunately, that issue isn't easily fixed in TC 5 but is something to 
keep in mind if you are used to being able to reload a webapp without an 
interruption in service.

Aside from that, all of the applications I've tested basically dropped 
into TC 5 from TC 4.  The only issue I ran across was that the jars in 
common/lib are different in TC 5 than TC 4 (most notably TC 5 no longer 
distributes javamail or the java activation framework.

-Dave

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


RE: Best practices - doing code pushes

2004-01-09 Thread David Rees
On Fri, January 9, 2004 at 5:10 pm, Jacob Kjome wrote:
 At 10:28 AM 1/9/2004 -0700, you wrote:
Thanks for the information. It looks like this is for Tomcat 5. We're
 using 4. Is there any similar functionality in 4?

 Not that I'm aware of.  I suggest moving to Tomcat5 if at all possible.
 It is *so* much better.  I think you'll like it.

Now if only they would add the same parameter to the reload manager function.

I brought this up here:
http://marc.theaimsgroup.com/?l=tomcat-userm=107105010220560w=2

There's a bug open for it here:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25596

-Dave

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



Re: Tomcat 5 standalone on Linux 2.6

2004-01-07 Thread David Rees
On Wed, January 7, 2004 1at 1:54 am, Remy Maucherat wrote:

 Does anyone have stability issues on this platform (without any
 LD_ASSUME_KERNEL, and with Sun JDK 1.4.2 or similar very recent VM) ?
 I'm trying to compare with Redhat 9 and see if the troubles also happen
 with that (cleaner) platform.

 Bonus question: How's the performance / scalability ?

I've been running Linux kernels 2.6.0 on a couple of very lightly loaded
Tomcat servers without any issues.  This is running on Fedora Core 1 and
JDK 1.4.2_01-b06 (which reminds me, I should upgrade that machine to the
latest JDK, 1.4.2_03-b02).  No LD_ASSUME_KERNEL env vars set.  I also have
a Redhat 7.3 with kernel 2.6.0 server running Tomcat with JDK 1.4.2_02-b03
with no problems, but again it's a development server so no real load.

I haven't done any performance / scalability tests but theoretically it
should be a lot better than 2.4 kernels.

BTW, I'm not sure what platform you really mean by Linux 2.6 as that
isn't a specific platform, but any Linux distribution running a 2.6
kernel.

-Dave

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



Re: Tomcat Tuning Memory leak

2003-12-30 Thread David Rees
Mohit Gupta wrote:

I am working on Tomcat 4.1.24 on Solatis-8, 12 CPU, 24GB RAM Machine. 
I am using Apache 2.0.43 and the Jdk version is 1.4.1_02.

When I start my server then after 5-6 hours my server becomes very 
slow and then I need to restart my server. I am taking the top stats 
for the tomcat and have found that normally the thread remains between 
100- 140 but when the system crashes it reaches to 372 and the memory 
gradually increases from 256 to some where around 660. The top stats 
are as follows

   PID USERNAME THR PRI NICE  SIZE   RES STATETIMECPU COMMAND
 13082 root 115   00  653M  578M cpu/290 313:31 37.64% java
 13082 root 139   70  654M  579M cpu/291 388:08 40.78% java
 13082 root 143   00  654M  580M cpu/419 466:39 41.43% java
 13082 root 374   10  662M  589M cpu/323 547:47 47.03% java
 13082 root 374  100  662M  589M cpu/291 625:42 53.59% java
 Here the Thread count increases from 143 to 374 in just 10 min. Even 
though the no of user accessing this site has decreased. I really 
dont know what the problem is...
 I have set the Catalina Option as -Xms128M -Xmx512M but even 
setting the value of -XMx1024 doesn't solved my problem.

 The connector settings in my server.xml are as follows

 Connector className=org.apache.coyote.tomcat4.CoyoteConnector 
acceptCount=5 bufferSize=2048 connectionTimeout=2 debug=0 
disableUploadTimeout=false enableLookups=false maxProcessors=350 
minProcessors=5 port=8009 
protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler 
proxyPort=0 redirectPort=8443 scheme=http secure=false 
tcpNoDelay=true useURIValidationHack=false
 Factory 
className=org.apache.catalina.net.DefaultServerSocketFactory/
 /Connector

Please tell me what is the problem with my configuration.  Please 
help me
First thing to find out is to figure out what all the threads are doing. 
 Send the Tomcat process a -QUIT signal (`kill -QUIT 13082`) and 
capture the output which will be sent to stdout.  You will get a stack 
trace for each thread showing what it is doing.  You will probably find 
that the threads are busy somewhere in your application code.

Additionally, upgrading to the latest Tomcat (4.1.27 or 5.0.16) and JDK 
(1.4.2_03) is a good idea as the latest versions have bug fixes and 
performance improvements.

I doubt it is a Tomcat issue, it is more than likely an issue with your 
application, but the stack trace will show the cause.

-Dave

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


Re: setting opts to avoid OutOfMemory errors

2003-12-19 Thread David Rees
David Strupl wrote:
Sorry but how do I set the fork attribute of the JspServlet to true?
Look at Tomcat's conf/web.xml, and you will see it.

This seems like an obvoius memory leak in somewhere IMHO:
snip
Is this how is tomcat supposed to work (on SUN's JDK)?
Your script will cause TC to run OOM unless the fork option for 
compiling JSPs is set to true.

-Dave

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


Re: Tomcat performance on Windows versus Linux

2003-12-15 Thread David Rees
On Mon, December 15, 2003 at 9:42 am, Sean Dockery wrote:
 Tim Funk [EMAIL PROTECTED] wrote in message:
 [I hate saying this since its rather very much like flambait
 but...]

 If its worth anything, I haven't had enough load on any of our apps
 to know whether Linux or Windows is better. Instead, look at: ***
 - Maintenance - If your a windows shop - stay windows *** -
 Debugging - I think troubleshooting is easier on *nix systems
 (YMMV) - Comfort - If your comfortable with unix concepts - linux
 might be easier than windows

 Thanks, Tim, for the even handed response.

 I'm not looking for a business case to choose one or the other,
 however; it is certain that our customers will be deploying our
 application on both Linux and Windows (and even Solaris). I'm just
 looking to find out whether or not OS service (TCP/IP stacks,
 threads, file I/O, etc...) implementation differences between Linux
 and Windows have a significant impact on performance and thus should
 be weighed accordingly.

Not enough difference to make it a deciding factor between the two
platforms.  IMO, Tim's criteria are spot on when deciding what platform to
deploy on.  Personally, I prefer Unix as I find it easier to setup and
administer.  Of course, the majority of my experience with Tomcat is on
Unix, and not on Windows.

If you haven't looked already, have a look at the Volano benchmarks
(google for it) for some numbers on the scalability and performance of
different JVM, but note that those numbers won't necessarily reflect the
performance of YOUR application running on Tomcat.

 My conclusions from my readings so far: Slow java code (i.e.:
 algorithms) will be slow on any platform; change the implementation
 to make it faster. Configurable behaviour dependent upon OS services
 (TCP/IP stacks, threads, file I/O, etc...) should be tuned for the
 platform on which the application will live.

I think you've got the idea.

-Dave


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



Re: Need some Tomcat Configuration help badly

2003-12-14 Thread David Rees
Dick Steflik wrote:
I had the same question. In all of the years I've worked with Java I've 
always thought  it was free of memory leaks. If you use a different 
compiler does the problem go away. Is that how people like JRun 
(Macromedia)  and WebSphere (IBM) avoid the problem?
Which bug are you talking about, the classloader reload memory leak or 
the javac memory leak?  The latter, they probably just fork javac by 
default.  The former, well, I'd like to see whether or not they do 
suffer from that issue or not!

-Dave

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


Re: Need some Tomcat Configuration help badly

2003-12-14 Thread David Rees
Philipp Taprogge wrote:
Dick Steflik wrote:
 If you use a different
compiler does the problem go away. 
I think so. I often hear that using jikes instead of javac would get rid 
of the problem, which, if true, rises the question why tomcat does not 
use jikes by default...
Because jikes isn't as stable as javac, and not everyone wants to 
install jikes on their server.

It's easy enough to get it going yourself, and it certainly compiles 
JSPs a LOT faster than javac does.

-Dave

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


Re: Need some Tomcat Configuration help badly

2003-12-13 Thread David Rees
Dick Steflik wrote:
Thanks, that did the trick , the entire Fall2003 class of CS328 
(actually the kids were probably hoping that it wouldn't get fixed and I 
would excuse them from the project) THANKS you .
BTW, there is a bug with Tomcat which will cause it to run out of memory 
after a number of restarts.  You will probably run into this with 30 
students uploading new classes.  You will also want to make sure that 
the fork attribute for the JspServlet is set to true as well as 
compiling JSPs will leak memory unless the compiling process is forked.

To work around the memory leak issue when the context reloads you'll 
either have to regularly restart Tomcat, and you can also set the -Xmx 
startup parameter to something like -Xmx256M or higher if your machine 
has the memory so that it will take longer to run out of memory.  By 
default java runs as if -Xmx64M was set.

-Dave

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


Re: setting opts to avoid OutOfMemory errors

2003-12-13 Thread David Rees
Hans Steinraht wrote:

Maybe someone can help me out with some questions I have to avoid the
OutOfMemory errors that I have from time to time
The computer where Tomcat, version 4.1.24, is running is a linux machine 
wit 500M memory
and j2sdk1.4.1.

I have read in this newsgroup that the solutions to avoid OutOfMemory 
errors is to set the
initial size of the memory allocation pool Xms to a value and also the 
max size Xmx.

In this I have to questions:
   1. what are the best values?
   2. happends when I set the values to high?
I have tried running tomcat with JAVA_OPTS=-Xms64m -Xmx256m, but the
problem still occurs, so can I set Xmx to 500m, but what is than happening
with the memory left (maybe there isn't) for tha other applications on thie
machine.
All increasing the -Xmx256M setting will do is delay the onset of the 
OOM condition, it won't fix it.  If you compile a lot of JSPs, make sure 
that in the container's web.xml you set the fork attribute of the 
JspServlet to true or use jikes, otherwise that will leak memory as well.

With a machine that has 500M, I wouldn't use more than 256M for Tomcat 
unless nothing else is running on it.

-Dave

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


Re: google yourself

2003-12-13 Thread David Rees
phil campaigne wrote:
Nikola Milutinovic wrote:
Ostad, James wrote:
have you googled yourself at goole.com?
I don't know how they get all of our listserv communications.
There is a web archive of this list.
What if you don't want everyone in the world to know your business?
Don't post to a public list.

-Dave

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


Re: Need some Tomcat Configuration help badly

2003-12-13 Thread David Rees
Philipp Taprogge wrote:
David Rees wrote:

BTW, there is a bug with Tomcat which will cause it to run out of 
memory after a number of restarts.  You will probably run into this 
with 30 students uploading new classes.  You will also want to make 
sure that the fork attribute for the JspServlet is set to true as well 
as compiling JSPs will leak memory unless the compiling process is 
forked.
Is this true only for Tomcat4 or for version 5 as well?
True for both.

-Dave

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


Re: javax.mail.SendFailedException: Sending failed

2003-12-12 Thread David Rees
On Fri, December 12, 2003 at 3:20 pm, Ashwin Kutty wrote:

 This was NOT a sendmail issue if you followed the positive discussions I
had with some other members on this list.  If it were I would have taken
it to the sendmail list/forum.  I thank the members here for their
assistance and would like to happily announce that the problem has been
solved.

Please run your test from the same machine as the application server, not
a different server as you indicated earlier.

There isn't any javamail configuration which would generate the relaying
denied message, and it certainly isn't a Tomcat issue, so your message is
off-topic and more appropriate for a Java-users list.

The javamail API isn't even included in the 5.x series of Tomcat anymore.

-Dave




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



Manager context reload behavior difference in TC 5 vs 4

2003-12-10 Thread David Rees
When reloading an app in TC 4 with the Manager app, it had the nice 
behavior of blocking any new requests until the app was reloaded.  TC 5 
seems to return blank pages while a context is reloading.

The behavior of TC 4 is preferred since that way if someone happens to 
hit the context during the reload, it only seems to them that the server 
is slow in stead of being broken.

Is this known behavior?  Any comments between the two behaviors?

-Dave

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


  1   2   >