Re: Tomcat App becomes Unresponsive

2008-01-26 Thread Felix Schumacher

Am Freitag, den 25.01.2008, 16:40 -0500 schrieb tc:

 The calls look like this:
 
 public void testXXX(DataSource ds, String login) {
 PreparedStatement ps=null;
 ResultSet rs=null;
 
 try {
 ...
 }catch (Exception e) {
 System.out.println(Exception:  + e);
 e.printStackTrace();
 }
 finally {
 try {
...
 try {
 if(conn != null || conn.isClosed()) conn.close();
You are closing the connection only, if it is not null and already
closed. So it will most likely be left open. You probably wanted

if ( !(conn == null || conn.isClosed()) ) { conn.close() }; // but why
should the connection be closed here?

If you think you have a datasource connection leak, you can search the
docs
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html for 
Preventing dB connection pool leak and setting the logAbandoned,
removeAbandoned and removeAbandonedTimeout parameters in your
datasource.

Bye
 Felix


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



Re: Download Dialog inclusing file extention

2008-01-26 Thread Konstantin Kolinko
You should use Content-Disposition header in your response.
It allows you to provide filename of the file, and that includes its extension.

Also, I suppose that the save as dialog honors the mime-type of your
response. If that mime-type is known at your client computers, it may
offer the relevant extension. I have not tested that, though.

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



Re: Need *faster* connection abort with mod_jk

2008-01-26 Thread Rainer Jung

Hi Chris,

you are totally right. It was a little late yesterday :(

I updates the two patches. The only change is in jk_ajp_common.c. The 
flax call inside ajp_next_connection is replaced by the normal one, so 
no more change there and instead the normal one in ajp_reset_endpoint 
now is a flex one.


I overlokked the obvious fact, that the client error is non recoverable, 
so we don't close the connection in ajp_next_connection, but instead 
immediately abort the service until later done is called and regularly 
closes the connection in ajp_reset_enpoint.


The patch should be safe in the sense that I don't expect problems. It's 
a little to early to guarantee inclusion in the regular distribution though.


Let us know, if you deploy it into production, and if it solves your 
problem.


Regards,

Rainer

Chris Hut schrieb:

Hi Rainer, thanks so much for the reply, this is looks like just what we
need!

I tried your patch on 1.2.26 and unfortunately it did not quite work -
still got the 30 second wait.  I dug a little deeper with some debugging
code and it looks like, in the case of a client abort, the code goes
through the old jk_shutdown_socket function (which forces linger to be
set to true) instead of the new jk_flex_shutdown_socket.

Here's my log output, my additions preceded with =:

[Fri Jan 25 19:40:18.516 2008] [7419:1147140448] [info]
ajp_process_callback::jk_ajp_common.c (1606): Writing to client aborted
or client network problems
[Fri Jan 25 19:40:18.516 2008] [7419:1147140448] [info]
ajp_service::jk_ajp_common.c (2191): (worker1) sending request to tomcat
failed (unrecoverable), because of client write error (attempt=1)
[Fri Jan 25 19:40:18.516 2008] [7419:1147140448] [info]
ajp_reset_endpoint::jk_ajp_common.c (695): == non-reusable endpoint,
calling jk_shutdown_socket
[Fri Jan 25 19:40:18.516 2008] [7419:1147140448] [info]
jk_shutdown_socket::jk_connect.c (636): == in jk_shutdown_socket,
calling jk_flex_shutdown_socket with linger set to TRUE
[Fri Jan 25 19:40:18.516 2008] [7419:1147140448] [info]
jk_flex_shutdown_socket::jk_connect.c (661): == linger is: 1

Experimenting some more, I found that if I changed line 695 in
jk_ajp_common.c from:

jk_shutdown_socket(ae-sd, l);

To:

jk_flex_shutdown_socket(ae-sd, ae-linger, l);

Then it works perfectly.  But, I hesitate to deploy my own hacks to our
production systems so if you could give this a once-over (and perhaps an
updated patch file, if you have time) that would be fantastic.

Thanks again for the help!

Chris

-Original Message-
From: Rainer Jung [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 25, 2008 4:37 PM

To: Tomcat Users List
Subject: Re: Need *faster* connection abort with mod_jk

Hi Chris,

perfect, that makes sense! Yes, we are draining the backend connection
before closing it down, and since in your case the backend is happy to
go along and proceed streaming it's not just a question of capturing a
few additional bytes.

Mladen Turk added the connection draining a while ago, so we might need
to discuss the pros and cons. The URL you gave includes a nice
description. In our case there is no pipelining and once we finished
sending the request (including possible request body) to the backend,
closing without draining should be save.

I made a patch, that should disable connection draining exactly if we
got a write error when using the client connection. The patch is
available at

http://people.apache.org/~rjung/mod_jk-dev/patches/jk_close_immediate_on
_client_wr_error.patch

(for 1.2.27-dev) and

http://people.apache.org/~rjung/mod_jk-dev/patches/jk_close_immediate_on
_client_wr_error-1_2_26.patch

(for 1.2.26)

If you want to test it, I would suggest using 1.2.26, because 1.2.27-dev
is not well tested yet and there are quite some changes in it.

Have fun,

Rainer

Chris Hut schrieb:

Hi Rainer, thanks for the reply!


interesting use case :)

Just trying to keep things entertaining around here :)

are you writing something back during the wait time, or are you 
simply

doing processing on the backend?

Yes, the long-running process (video rendering) is also streaming the 
video bytes back to the client using outputStream.write().  It's this 
write (ultimately, to an org.apache.catalina.connector.OutputBuffer)

that throws the ClientAbortException, if the client is actually gone.

So I figured out that JK is definitely holding open its connection 
Tomcat meaning Tomcat does not know to abort.  In desperation I 
searched for the number 30 (hoping for a constant) in the mod_jk 
source code, and found this in jk_connect.c:


#ifndef MAX_SECS_TO_LINGER
#define MAX_SECS_TO_LINGER 30
#endif
...
int jk_shutdown_socket(jk_sock_t s)
{
...
do {
/* Read all data from the peer until we reach end-of-file
 * (FIN from peer) or we've exceeded our overall timeout. If

the

 * backend does not send us bytes within 2 seconds
 * (a value pulled from Apache 1.3 which seems to work 

Re: find out the possible bottleneck webapp

2008-01-26 Thread Konstantin Kolinko
I think that java thread dump can be printed even if workload is heavy.

kill -3  command will produce it under UNIXes.



2008/1/24, maggie [EMAIL PROTECTED]:

 Is there any tool to provide such information Remotely even if the
 workload of Tomcat is very heavy?


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



Re: Tomcat Performance Question

2008-01-26 Thread David Brown
Hello Ali, please find included below a link URL that addresses the JSF 
performance issue. A much more rigorous test would be to use the JMeter 
distributed testing using the JMeter server. HTH, David.

Ali Ok wrote ..
 Hi,
 
 We are building a web application with JSF. Last day I tested it with
 JMeter. Results are bad (I guess).
 
 Then I tried to send 3 requests with JMeter to Shuffle Example in
 Tomcat's examples directory with a limited size of (256 MB I think) memory
 resource given to Tomcat. This Shuffle Example does not query database or
 does not make complicated operations as you know; it is very simple.
 
 Question is, what should I expect? Does it have to respond all requests? Or
 is it normal to throw an exception about Too many open files (I use NIO
 connector) and finally OutOfMemoryError and parachute-thing?
 
 After I solve this, I can go on to JSF application testing.
 
 
 I couldnt find documents enough about this issue. Can you send me some
 links?
 
 Thanks in advance.

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



Re: Tomcat Performance Question

2008-01-26 Thread Ali Ok
Thanks David,

I mean, if I make 3 requests in a very short time (about 10 seconds);
Tomcat does not respond.
I read books, tutorials, faqs and threads at maling list about Tomcat
tuning. But I couldnt find an example server.xml file used in production or
real test results.

So I cant understand if 3 requests in 10 seconds is normal or not.



2008/1/26, David Brown [EMAIL PROTECTED]:

 Hello Ali, please find included below a link URL that addresses the JSF
 performance issue. A much more rigorous test would be to use the JMeter
 distributed testing using the JMeter server. HTH, David.

 Ali Ok wrote ..
  Hi,
 
  We are building a web application with JSF. Last day I tested it with
  JMeter. Results are bad (I guess).
 
  Then I tried to send 3 requests with JMeter to Shuffle Example in
  Tomcat's examples directory with a limited size of (256 MB I think)
 memory
  resource given to Tomcat. This Shuffle Example does not query database
 or
  does not make complicated operations as you know; it is very simple.
 
  Question is, what should I expect? Does it have to respond all requests?
 Or
  is it normal to throw an exception about Too many open files (I use
 NIO
  connector) and finally OutOfMemoryError and parachute-thing?
 
  After I solve this, I can go on to JSF application testing.
 
 
  I couldnt find documents enough about this issue. Can you send me some
  links?
 
  Thanks in advance.

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




Re: Tomcat Performance Question

2008-01-26 Thread Peter Lin
30,000 requests in 10 seconds probably isn't normal traffic, but it could
represent a sudden spike.

think of it another way, that's 3,000 requests per second. If we calculate
that for a 10 hour period, it puts things in perspective

1000 req/sec * 60 sec/min = 60,000 req/min
60,000 req/min * 60 min/hr = 3,600,000 req/hr
3,600,000 req/hr * 10 hr = 36,000,000 req

that means during normal work hours, the server would get 36 million
requests. to handle that kind of traffic, first you have to have the
bandwidth. There's an old performance article I wrote that's listed on
tomcat's article section. read that and see if it helps

peter

On Jan 26, 2008 10:14 AM, Ali Ok [EMAIL PROTECTED] wrote:

 Thanks David,

 I mean, if I make 3 requests in a very short time (about 10 seconds);
 Tomcat does not respond.
 I read books, tutorials, faqs and threads at maling list about Tomcat
 tuning. But I couldnt find an example server.xml file used in production
 or
 real test results.

 So I cant understand if 3 requests in 10 seconds is normal or not.



 2008/1/26, David Brown [EMAIL PROTECTED]:
 
  Hello Ali, please find included below a link URL that addresses the JSF
  performance issue. A much more rigorous test would be to use the JMeter
  distributed testing using the JMeter server. HTH, David.
 
  Ali Ok wrote ..
   Hi,
  
   We are building a web application with JSF. Last day I tested it with
   JMeter. Results are bad (I guess).
  
   Then I tried to send 3 requests with JMeter to Shuffle Example
 in
   Tomcat's examples directory with a limited size of (256 MB I think)
  memory
   resource given to Tomcat. This Shuffle Example does not query
 database
  or
   does not make complicated operations as you know; it is very simple.
  
   Question is, what should I expect? Does it have to respond all
 requests?
  Or
   is it normal to throw an exception about Too many open files (I use
  NIO
   connector) and finally OutOfMemoryError and parachute-thing?
  
   After I solve this, I can go on to JSF application testing.
  
  
   I couldnt find documents enough about this issue. Can you send me some
   links?
  
   Thanks in advance.
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



RE: find out the possible bottleneck webapp

2008-01-26 Thread Caldarale, Charles R
 From: Konstantin Kolinko [mailto:[EMAIL PROTECTED] 
 Subject: Re: find out the possible bottleneck webapp
 
 kill -3  command will produce it under UNIXes.
 
 2008/1/24, maggie [EMAIL PROTECTED]:
 
  Is there any tool to provide such information Remotely even if the
  workload of Tomcat is very heavy?

There's a set of tools in the HotSpot JDK that look interesting:
http://java.sun.com/javase/6/docs/technotes/tools/index.html#troubleshoo
t

The jstack one in conjunction with jsadebugd would be of interest here.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



Re: Tomcat Performance Question

2008-01-26 Thread David Brown
Hello Ali, there are no absolute benchmarks for what you are looking for. The 
central theme to any performance questions invariably lead to the A word 
(Architecture). You need to evaluate you overall architecture from a high level 
perspective. With this said the questions then are:
* What is your planned network topology once you go to production? This 
question naturally leads to what is your hosting options? If you   have a 
datacenter and have configured and installed your own servers is the best. Next 
option is to build your servers and then co-locate. The least advantageous 
option is renting servers (serverbeach.com etc.). If you are hosting locally 
what is your upstream provider? (fat pipe) and type of connection: T1, T3, OC1, 
OC3 etc.
* Type of scaling (horizontal vs vertical)
* Invariably performance issues are rarely a result of the web container 
(Tomcat). You need to look at the developed software (dot).war that is deployed 
on TC (use JMeter or some recognized software testing tools).
* I have worked on high volume financial web applications that are running at 3 
to 4000 transactions/sec. A transaction is end-to-end a round-trip time 
starting with the HTTP connection, processing and connection to the backend DB, 
query results returned and subsequently a results web page displayed. This is a 
HTTP get, put or post transaction.
* You are hitting your TC with 3 transactions with a ramp up speed of 10 
seconds so you are at 3000/sec. If as you say the web container is not handling 
this you still need to look at what you web application is doing.

Ultimately, using JMeter you need to look here:
http://wiki.apache.org/jakarta-jmeter/

A expert in this area is Peter Lin:
http://tomcat.apache.org/articles/performance.pdf

The JMeter has specific JSF testing reading:
http://wiki.apache.org/myfaces/PerformanceTestingWithJMeter

Ali Ok wrote ..
 Thanks David,
 
 I mean, if I make 3 requests in a very short time (about 10 seconds);
 Tomcat does not respond.
 I read books, tutorials, faqs and threads at maling list about Tomcat
 tuning. But I couldnt find an example server.xml file used in production or
 real test results.
 
 So I cant understand if 3 requests in 10 seconds is normal or not.
 
 
 
 2008/1/26, David Brown [EMAIL PROTECTED]:
 
  Hello Ali, please find included below a link URL that addresses the JSF
  performance issue. A much more rigorous test would be to use the JMeter
  distributed testing using the JMeter server. HTH, David.
 
  Ali Ok wrote ..
   Hi,
  
   We are building a web application with JSF. Last day I tested it with
   JMeter. Results are bad (I guess).
  
   Then I tried to send 3 requests with JMeter to Shuffle Example in
   Tomcat's examples directory with a limited size of (256 MB I think)
  memory
   resource given to Tomcat. This Shuffle Example does not query database
  or
   does not make complicated operations as you know; it is very simple.
  
   Question is, what should I expect? Does it have to respond all requests?
  Or
   is it normal to throw an exception about Too many open files (I use
  NIO
   connector) and finally OutOfMemoryError and parachute-thing?
  
   After I solve this, I can go on to JSF application testing.
  
  
   I couldnt find documents enough about this issue. Can you send me some
   links?
  
   Thanks in advance.
 
  -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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



Re: comet end event

2008-01-26 Thread Martin Gainty
I downloaded the CometProcessor HTTPServlet event code and its running in
TC6 with JDK6

when executing the attached client I see

HTTP Status 405 - HTTP method GET is not supported by this URL - The
specified HTTP method is not allowed for the requested resource (HTTP method
GET is not supported by this URL)..
The request sent by the client was syntactically incorrect (HTTP method GET
is not supported by this URL).

There were more than a couple of folks with the same error with no answer
so..
Did anyone ask Filip for working client?
My inclination is to put a bug in but I cant say implementing the
NIOConnector is a supported TC6 feature

Thanks
Martin
- Original Message -
From: Peter Warren [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Friday, January 25, 2008 2:38 PM
Subject: Re: comet end event


 I put up a war file at: http://www.nomad.org/comet_test.war.

 It includes the webapp, source for the comet servlet  client, and the
 server.xml file.  Let me know if I missed anything.

 As I mentioned before, I've also used your cometgui.jar client and see
 the end event generated when using it as well.  If I submit a chunk
 and the last chunk (0crlfcrlf) together, I see a read error on the
 server.  If I submit a chunk and then submit the last chunk in two
 separate submissions, I see an end event on the server.

 Peter

 On Jan 24, 2008 12:44 PM, Filip Hanik - Dev Lists [EMAIL PROTECTED]
wrote:
 
  even with your code, I wasn't able to replicate what you were seeing.
  what I would need to see what's going on for you:
 
  1. a war file with your comet server, and source code
  2. a test client
  3. your server.xml
 
  Filip
 

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




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



Re: Tomcat Performance Question

2008-01-26 Thread Ali Ok
Peter, thats ok, maybe some day we can get that much hit :)

What if someone make so much requests and confuse the server?
Does Tomcat have an prevention for this situation? Or is it beyond the
scope?

David, I have already read all of resources you sent.

Invariably performance issues are rarely a result of the web container
 (Tomcat). You need to look at the developed software (dot).war that is
 deployed on TC (use JMeter or some recognized software testing tools).




* You are hitting your TC with 3 transactions with a ramp up speed of 10
 seconds so you are at 3000/sec. If as you say the web container is not
 handling this you still need to look at what you web application is doing.


I dont talk about my application. It may contain bugs or incorrect logic,
blaming Tomcat is not my intention. Many people thank developers and I
admire Apache SF.

I make that test of mine with Shuffle Example comes with Tomcat (XXX
/examples/jsp/jsp2/jspattribute/shuffle.jsp). And it is a simple JSP page,
cannot contain bugs :)

* What is your planned network topology once you go to production? This
 question naturally leads to what is your hosting options? If you   have a
 datacenter and have configured and installed your own servers is the best.
 Next option is to build your servers and then co-locate. The least
 advantageous option is renting servers (serverbeach.com etc.). If you are
 hosting locally what is your upstream provider? (fat pipe) and type of
 connection: T1, T3, OC1, OC3 etc.
 * Type of scaling (horizontal vs vertical)


My purpose is finding out the limits of Tomcat with constant resources at
the moment. Then I will continue with these.


I just want to have an idea in general. However its better to give details.

OS: Debian 4.0 r0 on VmWare
RAM assigned to virtual machine: 1 gb
CPU: Intel Core 2 Duo, 2 Ghz etc.
Tomcat: 6.0.13


My starting script:

/home/kullanici/Desktop/programlar/jdk1.6.0_03/bin/java -Xmx256m -Xms128m -
Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -
Djava.util.logging.config.file=/home/kullanici/Desktop/programlar/Tomcat_6_win/conf/logging.properties-
Djava.endorsed.dirs=/home/kullanici/Desktop/programlar/Tomcat_6_win/endorsed-classpath
:/home/kullanici/Desktop/programlar/Tomcat_6_win/bin/bootstrap.jar:/home/kullanici/Desktop/programlar/Tomcat_6_win/bin/commons-
logging-api.jar -
Dcatalina.base=/home/kullanici/Desktop/programlar/Tomcat_6_win -
Dcatalina.home=/home/kullanici/Desktop/programlar/Tomcat_6_win -
Djava.io.tmpdir=/home/kullanici/Desktop/programlar/Tomcat_6_win/temp
org.apache.catalina.startup.Bootstrap start


Thank you, Peter and David



2008/1/26, David Brown [EMAIL PROTECTED]:

 Hello Ali, there are no absolute benchmarks for what you are looking for.
 The central theme to any performance questions invariably lead to the A
 word (Architecture). You need to evaluate you overall architecture from a
 high level perspective. With this said the questions then are:
 * What is your planned network topology once you go to production? This
 question naturally leads to what is your hosting options? If you   have a
 datacenter and have configured and installed your own servers is the best.
 Next option is to build your servers and then co-locate. The least
 advantageous option is renting servers (serverbeach.com etc.). If you are
 hosting locally what is your upstream provider? (fat pipe) and type of
 connection: T1, T3, OC1, OC3 etc.
 * Type of scaling (horizontal vs vertical)
 * Invariably performance issues are rarely a result of the web container
 (Tomcat). You need to look at the developed software (dot).war that is
 deployed on TC (use JMeter or some recognized software testing tools).
 * I have worked on high volume financial web applications that are running
 at 3 to 4000 transactions/sec. A transaction is end-to-end a round-trip time
 starting with the HTTP connection, processing and connection to the backend
 DB, query results returned and subsequently a results web page displayed.
 This is a HTTP get, put or post transaction.
 * You are hitting your TC with 3 transactions with a ramp up speed of
 10 seconds so you are at 3000/sec. If as you say the web container is not
 handling this you still need to look at what you web application is doing.

 Ultimately, using JMeter you need to look here:
 http://wiki.apache.org/jakarta-jmeter/

 A expert in this area is Peter Lin:
 http://tomcat.apache.org/articles/performance.pdf

 The JMeter has specific JSF testing reading:
 http://wiki.apache.org/myfaces/PerformanceTestingWithJMeter

 Ali Ok wrote ..
  Thanks David,
 
  I mean, if I make 3 requests in a very short time (about 10
 seconds);
  Tomcat does not respond.
  I read books, tutorials, faqs and threads at maling list about Tomcat
  tuning. But I couldnt find an example server.xml file used in production
 or
  real test results.
 
  So I cant understand if 3 requests in 10 seconds is normal or not.
 
 
 
  2008/1/26, David Brown 

RE: Tomcat Performance Question

2008-01-26 Thread Caldarale, Charles R
 From: Ali Ok [mailto:[EMAIL PROTECTED] 
 Subject: Re: Tomcat Performance Question
 
 What if someone make so much requests and confuse the server?
 Does Tomcat have an prevention for this situation?

You can configure the maximum number of requests a Connector will
handle concurrently, as well as the maximum number Tomcat will queue for
the Connector before discarding them:
http://tomcat.apache.org/tomcat-6.0-doc/config/http.html

See the 3rd paragraph of the Introduction.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



Reload modifed servlet

2008-01-26 Thread Bob Riaz
Hello all,

My environment:
Windows XP-Pro
Tomcat 6
JDK 6
Eclipse JEE IDE

I find that whenever I make a change to my servlet, I need to
Clean/Rebuild the project in order for the changes to take effect. Even
restarting Tomcat doesn't take the change. It didn't used to be this way!!
I've set reloadable=true in Context.xml - doesn't help. This is the
situation on one machine. On a different machine using the same environment
I don't have this problem. Something about the way Tomcat was configured on
this machine then?
If anybody's had this probelm, please share your thoughts!

Many thanks.

Bob



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



Re: Tomcat Performance Question

2008-01-26 Thread Peter Lin
have you tried monitoring the CPU and IO usage of the system during the
test?

In the past, when I stress test an application, I monitor the cpu and io, to
determine which part is getting maxed out first. For example, if I was
serving up static pages, the first thing to mak out is the IO, so even
though tomcat could handle greater loads, it can't because of the IO. What I
usually do is identify the bottlenecks in the application by testing each
part separately. Once I know the max through of each component, I ran the
stress test with JMeter.

If you haven't measured each piece individually, it will be difficult to
figure why the application is slow.

hope that helps

peter

On Jan 26, 2008 11:32 AM, Ali Ok [EMAIL PROTECTED] wrote:

 Peter, thats ok, maybe some day we can get that much hit :)

 What if someone make so much requests and confuse the server?
 Does Tomcat have an prevention for this situation? Or is it beyond the
 scope?

 David, I have already read all of resources you sent.

 Invariably performance issues are rarely a result of the web container
  (Tomcat). You need to look at the developed software (dot).war that is
  deployed on TC (use JMeter or some recognized software testing tools).




 * You are hitting your TC with 3 transactions with a ramp up speed of
 10
  seconds so you are at 3000/sec. If as you say the web container is not
  handling this you still need to look at what you web application is
 doing.
 

 I dont talk about my application. It may contain bugs or incorrect logic,
 blaming Tomcat is not my intention. Many people thank developers and I
 admire Apache SF.

 I make that test of mine with Shuffle Example comes with Tomcat (XXX
 /examples/jsp/jsp2/jspattribute/shuffle.jsp). And it is a simple JSP page,
 cannot contain bugs :)

 * What is your planned network topology once you go to production? This
  question naturally leads to what is your hosting options? If you   have
 a
  datacenter and have configured and installed your own servers is the
 best.
  Next option is to build your servers and then co-locate. The least
  advantageous option is renting servers (serverbeach.com etc.). If you
 are
  hosting locally what is your upstream provider? (fat pipe) and type of
  connection: T1, T3, OC1, OC3 etc.
  * Type of scaling (horizontal vs vertical)
 

 My purpose is finding out the limits of Tomcat with constant resources at
 the moment. Then I will continue with these.


 I just want to have an idea in general. However its better to give
 details.

 OS: Debian 4.0 r0 on VmWare
 RAM assigned to virtual machine: 1 gb
 CPU: Intel Core 2 Duo, 2 Ghz etc.
 Tomcat: 6.0.13


 My starting script:

 /home/kullanici/Desktop/programlar/jdk1.6.0_03/bin/java -Xmx256m -Xms128m
 -
 Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -

 Djava.util.logging.config.file=/home/kullanici/Desktop/programlar/Tomcat_6_win/conf/logging.properties-

 Djava.endorsed.dirs=/home/kullanici/Desktop/programlar/Tomcat_6_win/endorsed-classpath

 :/home/kullanici/Desktop/programlar/Tomcat_6_win/bin/bootstrap.jar:/home/kullanici/Desktop/programlar/Tomcat_6_win/bin/commons-
 logging-api.jar -
 Dcatalina.base=/home/kullanici/Desktop/programlar/Tomcat_6_win -
 Dcatalina.home=/home/kullanici/Desktop/programlar/Tomcat_6_win -
 Djava.io.tmpdir=/home/kullanici/Desktop/programlar/Tomcat_6_win/temp
 org.apache.catalina.startup.Bootstrap start


 Thank you, Peter and David



 2008/1/26, David Brown [EMAIL PROTECTED]:
 
  Hello Ali, there are no absolute benchmarks for what you are looking
 for.
  The central theme to any performance questions invariably lead to the
 A
  word (Architecture). You need to evaluate you overall architecture from
 a
  high level perspective. With this said the questions then are:
  * What is your planned network topology once you go to production? This
  question naturally leads to what is your hosting options? If you   have
 a
  datacenter and have configured and installed your own servers is the
 best.
  Next option is to build your servers and then co-locate. The least
  advantageous option is renting servers (serverbeach.com etc.). If you
 are
  hosting locally what is your upstream provider? (fat pipe) and type of
  connection: T1, T3, OC1, OC3 etc.
  * Type of scaling (horizontal vs vertical)
  * Invariably performance issues are rarely a result of the web container
  (Tomcat). You need to look at the developed software (dot).war that is
  deployed on TC (use JMeter or some recognized software testing tools).
  * I have worked on high volume financial web applications that are
 running
  at 3 to 4000 transactions/sec. A transaction is end-to-end a round-trip
 time
  starting with the HTTP connection, processing and connection to the
 backend
  DB, query results returned and subsequently a results web page
 displayed.
  This is a HTTP get, put or post transaction.
  * You are hitting your TC with 3 transactions with a ramp up speed
 of
  10 seconds so you are at 

Re: Tomcat Performance Question

2008-01-26 Thread David Kerber

Ali Ok wrote:

Thanks David,

I mean, if I make 3 requests in a very short time (about 10 seconds);
Tomcat does not respond.
I read books, tutorials, faqs and threads at maling list about Tomcat
tuning. But I couldnt find an example server.xml file used in production or
real test results.

So I cant understand if 3 requests in 10 seconds is normal or not.
  
3000 requests per second is something on the order of what microsoft 
gets on its entire set of websites (microsoft.com, hotmail, live, etc, 
all combined), and they have a big server farm running it.  That's a lot 
of requests, and you need to provision your hardware and bandwidth 
accordingly.


D



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



Re: Tomcat Performance Question

2008-01-26 Thread mgainty
Good Point
suggest taking a look at implementing Tomcat Clustering to accomodate
greater loads
http://wiki.apache.org/tomcat/FAQ/Clustering

M-
- Original Message -
Wrom: VRESKPNKMBIPBARHDMNNSKVFVWRKJVZCMHVIB
To: Tomcat Users List users@tomcat.apache.org
Sent: Saturday, January 26, 2008 2:18 PM
Subject: Re: Tomcat Performance Question


 Ali Ok wrote:
  Thanks David,
 
  I mean, if I make 3 requests in a very short time (about 10
seconds);
  Tomcat does not respond.
  I read books, tutorials, faqs and threads at maling list about Tomcat
  tuning. But I couldnt find an example server.xml file used in production
or
  real test results.
 
  So I cant understand if 3 requests in 10 seconds is normal or not.
 
 3000 requests per second is something on the order of what microsoft
 gets on its entire set of websites (microsoft.com, hotmail, live, etc,
 all combined), and they have a big server farm running it.  That's a lot
 of requests, and you need to provision your hardware and bandwidth
 accordingly.

 D



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




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



Did I find a bug?

2008-01-26 Thread Jonadan

Hi,

I am having a strange JSP compiler problem. The error message is as follows.
First, notice that the lines cocerned are commented out! Still compiler
compiling!
Second, the second argument of the caller is missing in the error message!

???

===
org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 70 in the jsp file: /jsp/pdfexample1.jsp
The method addCell(Object, Table, int, int, int, int) in the type iTex is
not applicable for the arguments (Image, int, int, int, int)
67: 
68: 
69: 
70: // cell = iTex.addCell(Image.getInstance(data), 
71: //  datatable, iTex.ALIGN_CENTER, 
iTex.ALIGN_TOP, 2, 1);
72: 
73: 


Stacktrace:

org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)

org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
servlets.rme.jspreport.doGet(jspreport.java:23)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
-- 
View this message in context: 
http://www.nabble.com/Did-I-find-a-bug--tp15113261p15113261.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



RE: find out the possible bottleneck webapp

2008-01-26 Thread Jonadan

Hi,

What do you mean by SOMETIMES? 
Is it recurring problem at certain intervals?

If it's early-on, it's more likely caused by first time compiling.
If it occurs at certain intervals and you use large heap memory,
its likely for garbage collection. You can find out the heap memory size
allocated and using with Runtime APIS.

Regards.

Regards.

-- 
View this message in context: 
http://www.nabble.com/find-out-the-possible-bottleneck-webapp-tp15065234p15114035.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Did I find a bug?

2008-01-26 Thread Mark Thomas

Jonadan wrote:

Hi,

I am having a strange JSP compiler problem. The error message is as follows.
First, notice that the lines cocerned are commented out! Still compiler
compiling!
Second, the second argument of the caller is missing in the error message!

???


Yes, this is a bug:
http://issues.apache.org/bugzilla/show_bug.cgi?id=43757

It is fixed in svn for 5.5.x and 6.0.x and will be in the next release of each.

Mark


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



Re: No Authentication Dialog appears for Tomcat Manager

2008-01-26 Thread David Simmons

Hi,

I just experienced the same problem, found this thread via Google, and 
figured I'd post my experience and solution.


Just like Mark's experience, I installed Tomcat and could not use the 
manager app because the browser never presented me a dialog box for the 
username and password.  Sure enough, an analysis of the HTTP response 
headers reveals no WWW-Authenticate header, so the browser is not at 
fault:


HTTP/1.1 401
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
Content-Length: 954
Date: Sun, 27 Jan 2008 02:56:12 GMT

(Apache Tomcat/6.0.14 - Error report body here...)

However, I noticed in my catalina.out numerous exceptions where Tomcat 
was getting permission denied while attempting to write to files. 
Sure enough, when I corrected the permissions so that the tomcat user 
had write permissions to all relevant directories and files, everything 
started working normally.


I can see how the strange behavior of the manager app could be really 
frustrating and not very helpful, but it turned out to be a pretty 
mundane problem.


David

Mark Riggins wrote:

Unfortunately, I'm not sure, and I don't know how to recreate the problem.

Sorry.

Mark


David Smith-2 wrote:
I'm just wondering if you got a 401 page, but a 200 status or something 
like that.  Maybe one of your customizations did some filtering and/or 
proxying and changed the response code.  Seems like the most reasonable 
cause of your problem.


--David

Mark Riggins wrote:


It turns out that Netbeans likes to use the Tomcat Manager, so I had to

get

this working.  Since others claimed that it worked out of the box I just
uninstalled everything [losing quite a bit of customization] and 
did a clean vanilla install.


Now it works, but I have no idea what caused the problem.   This is NOT A
BROWSER PROBLEM -- I tried two different browsers before, firefox and IE,
neither worked before, and both work now.   I too had added
another user, so perhaps it has something to do with that.

At this point, I'm just glad its working.   Fortunately, at this point,

I'm

just dorking around, refreshing my tech skills, which have gotten a little
dusty, so I can easily chuck the whole install and start fresh.

Mark


wlievens wrote:
 


Mark Riggins wrote:
   


Instead of a basic-authentication dialog box, I get the following error
message instead.

   HTTP Status 401 -

   type Status report

   message

  description This request requires HTTP authentication ().
  Apache Tomcat/6.0.13

My tomcat-users.xml file looks like this:
?xml version='1.0' encoding='utf-8'?

tomcat-users

 role rolename=tomcat/

 role rolename=manager/

 role rolename=admin/

 user username=tomcat password=tomcat roles=tomcat/

 user username=manager password=manager roles=manager/

 user username=admin password=admin roles=admin/

/tomcat-users


From web.xml I have:
 !-- Define the Login Configuration for this Application --
 login-config
   auth-methodBASIC/auth-method
   realm-nameTomcat Manager Application/realm-name
 /login-config

 !-- Security roles referenced by this web application --
 security-role
   description
 The role that is required to log in to the Manager Application
   /description
   role-namemanager/role-name
 /security-role

But the dialog NEVER APPEARS.

Any help would be greatly appreciated.  I can't get ANT to work without
this.

 


I have the exact same problem. The only thing I changed in my
configuration was adding a user. I never get the dialog prompt.

I'd really like a solution for this problem.

   

 



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








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



Re: No Authentication Dialog appears for Tomcat Manager

2008-01-26 Thread Mark Riggins

Thanks!

Mark


David Simmons wrote:
 
 Hi,
 
 I just experienced the same problem, found this thread via Google, and 
 figured I'd post my experience and solution.
 
 Just like Mark's experience, I installed Tomcat and could not use the 
 manager app because the browser never presented me a dialog box for the 
 username and password.  Sure enough, an analysis of the HTTP response 
 headers reveals no WWW-Authenticate header, so the browser is not at 
 fault:
 
 HTTP/1.1 401
 Server: Apache-Coyote/1.1
 Content-Type: text/html;charset=utf-8
 Content-Length: 954
 Date: Sun, 27 Jan 2008 02:56:12 GMT
 
 (Apache Tomcat/6.0.14 - Error report body here...)
 
 However, I noticed in my catalina.out numerous exceptions where Tomcat 
 was getting permission denied while attempting to write to files. 
 Sure enough, when I corrected the permissions so that the tomcat user 
 had write permissions to all relevant directories and files, everything 
 started working normally.
 
 I can see how the strange behavior of the manager app could be really 
 frustrating and not very helpful, but it turned out to be a pretty 
 mundane problem.
 
 David
 
 Mark Riggins wrote:
 Unfortunately, I'm not sure, and I don't know how to recreate the
 problem.
 
 Sorry.
 
 Mark
 
 
 David Smith-2 wrote:
 I'm just wondering if you got a 401 page, but a 200 status or something 
 like that.  Maybe one of your customizations did some filtering and/or 
 proxying and changed the response code.  Seems like the most reasonable 
 cause of your problem.

 --David

 Mark Riggins wrote:

 It turns out that Netbeans likes to use the Tomcat Manager, so I had to
 get
 this working.  Since others claimed that it worked out of the box I
 just
 uninstalled everything [losing quite a bit of customization] and 
 did a clean vanilla install.

 Now it works, but I have no idea what caused the problem.   This is NOT
 A
 BROWSER PROBLEM -- I tried two different browsers before, firefox and
 IE,
 neither worked before, and both work now.   I too had added
 another user, so perhaps it has something to do with that.

 At this point, I'm just glad its working.   Fortunately, at this point,
 I'm
 just dorking around, refreshing my tech skills, which have gotten a
 little
 dusty, so I can easily chuck the whole install and start fresh.

 Mark


 wlievens wrote:
  

 Mark Riggins wrote:


 Instead of a basic-authentication dialog box, I get the following
 error
 message instead.

HTTP Status 401 -

type Status report

message

   description This request requires HTTP authentication ().
   Apache Tomcat/6.0.13

 My tomcat-users.xml file looks like this:
 ?xml version='1.0' encoding='utf-8'?

 tomcat-users

  role rolename=tomcat/

  role rolename=manager/

  role rolename=admin/

  user username=tomcat password=tomcat roles=tomcat/

  user username=manager password=manager roles=manager/

  user username=admin password=admin roles=admin/

 /tomcat-users


 From web.xml I have:
  !-- Define the Login Configuration for this Application --
  login-config
auth-methodBASIC/auth-method
realm-nameTomcat Manager Application/realm-name
  /login-config

  !-- Security roles referenced by this web application --
  security-role
description
  The role that is required to log in to the Manager Application
/description
role-namemanager/role-name
  /security-role

 But the dialog NEVER APPEARS.

 Any help would be greatly appreciated.  I can't get ANT to work
 without
 this.

  

 I have the exact same problem. The only thing I changed in my
 configuration was adding a user. I never get the dialog prompt.

 I'd really like a solution for this problem.



  


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



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

-- 
View this message in context: 
http://www.nabble.com/No-Authentication-Dialog-appears-for-Tomcat-Manager-tp14780731p15115906.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Tomcat memory leak?

2008-01-26 Thread Ofer Kalisky

Hi guys,

Indeed session disabling did the job.

Thanks!

- Original Message - 
From: Christopher Schultz [EMAIL PROTECTED]

To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, January 24, 2008 9:26 PM
Subject: Re: Tomcat memory leak?



-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ofer,

Ofer Kalisky wrote:
| That's what I'm saying, I've been sitting on this for two days and can't
| figure it out.

Does your JSP disable sessions? It's possible that your python script is
creating millions of (unused) sessions that don't expire before you bust
your heap.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkeY5k0ACgkQ9CaO5/Lv0PAW9ACeK3nEkRrl3t9gwhu91S28UmnO
aMYAoL824Fsk3pmuYWBPIORO54WqnuDG
=5J03
-END PGP SIGNATURE-

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



__ Information from ESET NOD32 Antivirus, version of virus 
signature database 2824 (20080126) __


The message was checked by ESET NOD32 Antivirus.

http://www.eset.com





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