Re: Problem with overriding parameters via context.xml

2011-02-28 Thread Rainer Frey
On Monday 28 February 2011 16:53:00 Mark Thomas wrote:
> On 28/02/2011 14:51, Rainer Frey wrote:
> > On Friday 25 February 2011 17:21:07 Mark Thomas wrote:
> >> 6.0.33 is likely to be several months away. I don't see anything in the
> >> change log that is likely to prompt an earlier release.
> > 
> > Ouch. 50700 is an absolute blocker for me. I'm stuck with 6.0.29 because
> > of this, and having a useable release with the numerous fixes from
> > 6.0.30 would be good.
> 
> What's wrong with 7.0.9? I am in the processing of uploading the files
> for the release vote now. The ASF Jira instance has been happily running
> 7.0.x since 7.0.6 was announced as stable.

I plan to test with Tomcat 7, but some apps did not work well with the beta 
versions (IIRC because of using incorrect URL mappings that did work in Tomcat 
6).

Rainer

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



Servlet 3.0 Securty Annotations

2011-02-28 Thread Michael McCutcheon

Does Tomcat 7.0.8 support the Servlet 3.0 security annotations?

@RolesAllowed
@DeclareRoles
@ServletSecurity

, etc.?

thanks,
Mike

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



Re: Context - useHttpOnly

2011-02-28 Thread Mark Thomas
On 28/02/2011 21:31, Leo Donahue - PLANDEVX wrote:
> A security audit of my site indicated a "Missing HttpOnly attribute in 
> Session Cookie" problem.  If this is a security problem,

In and off itself a missing httpOnly attribute is not a security
vulnerability. It is, however, a good idea to enable it since it
provides a fair amount of protection should your web app have an XSS
vulnerability (and most apps do).

> then why does the useHttpOnly attribute in Context default to false?

Backwards compatibility. The feature was added just after a lot of other
cookie changes (to make Tomcat more specification compliant) that caused
issues for a fair number of users whose apps were not spec compliant.
The Tomcat devs voted to make it disabled by default to reduce the risk
of further backwards compatibility issues.

It is enabled by default in Tomcat 7.

Mark

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



Context - useHttpOnly

2011-02-28 Thread Leo Donahue - PLANDEVX
A security audit of my site indicated a "Missing HttpOnly attribute in Session 
Cookie" problem.  If this is a security problem, then why does the useHttpOnly 
attribute in Context default to false?  I'm not specifically setting any 
cookies...

http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

Using CATALINA_BASE:   "C:\apache-tomcat-6.0.29"
Using CATALINA_HOME:   "C:\apache-tomcat-6.0.29"
Using CATALINA_TMPDIR: "C:\apache-tomcat-6.0.29\temp"
Using JRE_HOME:"C:\Program Files\Java\jdk1.6.0_20"
Using CLASSPATH:   "C:\apache-tomcat-6.0.29\bin\bootstrap.jar"
Server version: Apache Tomcat/6.0.29
Server built:   July 19 2010 1458
Server number:  6.0.0.29
OS Name:Windows 2003
OS Version: 5.2
Architecture:   x86
JVM Version:1.6.0_20-b02
JVM Vendor: Sun Microsystems Inc

Leo



Re: IIS7/isapi/tomcat performance

2011-02-28 Thread Tony Anecito
Sure no problem. I also use Native APR with Tomcat 7 which eliminates AJP and 
supposidly is faster than Apache Web Server but then you use IIS probably for 
good reason so it would not help you to use APR.

Good luck,
-Tony



- Original Message 
From: Bruce Pease 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 1:08:19 PM
Subject: RE: IIS7/isapi/tomcat performance

Thanks for the insight.  It looks like we are going to go with server 2003 32
bit.  I found some references that suggest ajp 1.3 has a performance issue in
64 bit server 2008.

-Original Message-
From: Tony Anecito [mailto:adanec...@yahoo.com] 
Sent: Monday, February 28, 2011 3:01 PM
To: Tomcat Users List
Subject: Re: IIS7/isapi/tomcat performance

I forgot to mention new versions of Windows are slower than XP. So that would

contribute to your issues. Windows 7 got better but not as fast as 32-bit.

Also, you might want to measure from tomcat perspective so you have a new 
baseline.

Regards,
-Tony



- Original Message 
From: Tony Anecito 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 12:57:03 PM
Subject: Re: IIS7/isapi/tomcat performance

Since the memory pointers are larger you may need to increase your heap size
but 

you can compress the address pointers.

Also, if you use JNI and it is 32-bit then you will have unexpected issues
same 
thing with any native libs your try to use.

Generally it will be up to 20% slower due to the pointers.

Recommend you stick to 32-bit if your app fits within the memory space for 
32-bit. I have heard that 64-bit jvm for version 7 might be faster than
32-bit.

Good Luck,
-Tony



- Original Message 
From: Tony Anecito 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 12:40:43 PM
Subject: Re: IIS7/isapi/tomcat performance

JVM settings should not be the same.

Regards,
-Tony



- Original Message 
From: Bruce Pease 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 11:46:35 AM
Subject: RE: IIS7/isapi/tomcat performance

Perhaps my point is being missed here.  The issue is moving from 32 bit is
slower in 64 bit (4-500% if you need a number).  Components are the same,
setup is the same, database is the same, environment is the same, tests are
the same, network is the same.  I'm basically looking to see if anyone is
using a similar setup, and has been able to get it to perform well.

-Original Message-
From: Tony Anecito [mailto:adanec...@yahoo.com] 
Sent: Monday, February 28, 2011 1:40 PM
To: Tomcat Users List
Subject: Re: IIS7/isapi/tomcat performance

I agree with Charles. I run a performance Testing group for a fortune 50
company 
and do alot of performance testing for different designs/implementation for
my 
own startup and we can not help you without further info.

Client side setup (Browser/version?)
Test cases
Network speed
Tomcat Setup (startup command line with jdk options)
Extending logging options such as request time for tomcat
Make sure your logging is set to error and not debug level on your processes 
(IIS, Tomcat, Database?)

I would use yslow with FF to get page sizes and other info. developers seem
to 
forget that the bandwidth is limited and 1MB pages are too big. Sometimes
images 
are small but the javascript is quite big especially when calling web
services 
directly,
For the middle tier a code profiler like visualvm helps quite a bit.

The key thing is narrow it down tier by tier then focus on the tier where you

see the biggest gains.
If manually you see x seconds then that is the best it will be before you
start 
tuning.
Gains in code will always be larger than that by configuration tuning unless 
logging level is set to high especially for jdbc calls.

Good luck,
Tony Anecito (JavaOne 2010 "I am the future of Java winner")
Founder,
MyUniPortal (JavaOne 2010 "Duke's Award Winner")
http://www.myuniportal.com


 


- Original Message 
From: "Caldarale, Charles R" 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 11:15:40 AM
Subject: RE: IIS7/isapi/tomcat performance

> From: Bruce Pease [mailto:bpe...@wth.com] 
> Subject: IIS7/isapi/tomcat performance

> In performance tests I have found the configuration runs
> dramatically slower than it's corresponding server in 32
> bit Windows on 2000 Server and Tomcat 6.

Until you quantify "dramatically", better describe your testing scenario 
(including configurations of all components), eliminate as many moving pieces
as 
you can (e.g., try Tomcat standalone), and do some basic bottleneck analysis,

there's not much anyone can help you with.

- 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-

Re: IIS7/isapi/tomcat performance

2011-02-28 Thread הילה
?Which performance issue


2011/2/28 Bruce Pease 

> Thanks for the insight.  It looks like we are going to go with server 2003
> 32
> bit.  I found some references that suggest ajp 1.3 has a performance issue
> in
> 64 bit server 2008.
>
> -Original Message-
> From: Tony Anecito [mailto:adanec...@yahoo.com]
> Sent: Monday, February 28, 2011 3:01 PM
> To: Tomcat Users List
> Subject: Re: IIS7/isapi/tomcat performance
>
> I forgot to mention new versions of Windows are slower than XP. So that
> would
>
> contribute to your issues. Windows 7 got better but not as fast as 32-bit.
>
> Also, you might want to measure from tomcat perspective so you have a new
> baseline.
>
> Regards,
> -Tony
>
>
>
> - Original Message 
> From: Tony Anecito 
> To: Tomcat Users List 
> Sent: Mon, February 28, 2011 12:57:03 PM
> Subject: Re: IIS7/isapi/tomcat performance
>
> Since the memory pointers are larger you may need to increase your heap
> size
> but
>
> you can compress the address pointers.
>
> Also, if you use JNI and it is 32-bit then you will have unexpected issues
> same
> thing with any native libs your try to use.
>
> Generally it will be up to 20% slower due to the pointers.
>
> Recommend you stick to 32-bit if your app fits within the memory space for
> 32-bit. I have heard that 64-bit jvm for version 7 might be faster than
> 32-bit.
>
> Good Luck,
> -Tony
>
>
>
> - Original Message 
> From: Tony Anecito 
> To: Tomcat Users List 
> Sent: Mon, February 28, 2011 12:40:43 PM
> Subject: Re: IIS7/isapi/tomcat performance
>
> JVM settings should not be the same.
>
> Regards,
> -Tony
>
>
>
> - Original Message 
> From: Bruce Pease 
> To: Tomcat Users List 
> Sent: Mon, February 28, 2011 11:46:35 AM
> Subject: RE: IIS7/isapi/tomcat performance
>
> Perhaps my point is being missed here.  The issue is moving from 32 bit is
> slower in 64 bit (4-500% if you need a number).  Components are the same,
> setup is the same, database is the same, environment is the same, tests are
> the same, network is the same.  I'm basically looking to see if anyone is
> using a similar setup, and has been able to get it to perform well.
>
> -Original Message-
> From: Tony Anecito [mailto:adanec...@yahoo.com]
> Sent: Monday, February 28, 2011 1:40 PM
> To: Tomcat Users List
> Subject: Re: IIS7/isapi/tomcat performance
>
> I agree with Charles. I run a performance Testing group for a fortune 50
> company
> and do alot of performance testing for different designs/implementation for
> my
> own startup and we can not help you without further info.
>
> Client side setup (Browser/version?)
> Test cases
> Network speed
> Tomcat Setup (startup command line with jdk options)
> Extending logging options such as request time for tomcat
> Make sure your logging is set to error and not debug level on your
> processes
> (IIS, Tomcat, Database?)
>
> I would use yslow with FF to get page sizes and other info. developers seem
> to
> forget that the bandwidth is limited and 1MB pages are too big. Sometimes
> images
> are small but the javascript is quite big especially when calling web
> services
> directly,
> For the middle tier a code profiler like visualvm helps quite a bit.
>
> The key thing is narrow it down tier by tier then focus on the tier where
> you
>
> see the biggest gains.
> If manually you see x seconds then that is the best it will be before you
> start
> tuning.
> Gains in code will always be larger than that by configuration tuning
> unless
> logging level is set to high especially for jdbc calls.
>
> Good luck,
> Tony Anecito (JavaOne 2010 "I am the future of Java winner")
> Founder,
> MyUniPortal (JavaOne 2010 "Duke's Award Winner")
> http://www.myuniportal.com
>
>
>
>
>
> - Original Message 
> From: "Caldarale, Charles R" 
> To: Tomcat Users List 
> Sent: Mon, February 28, 2011 11:15:40 AM
> Subject: RE: IIS7/isapi/tomcat performance
>
> > From: Bruce Pease [mailto:bpe...@wth.com]
> > Subject: IIS7/isapi/tomcat performance
>
> > In performance tests I have found the configuration runs
> > dramatically slower than it's corresponding server in 32
> > bit Windows on 2000 Server and Tomcat 6.
>
> Until you quantify "dramatically", better describe your testing scenario
> (including configurations of all components), eliminate as many moving
> pieces
> as
> you can (e.g., try Tomcat standalone), and do some basic bottleneck
> analysis,
>
> there's not much anyone can help you with.
>
> - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
>
>
> -

Re: AccessLogValve pattern (timestamp, bytes sent and time taken)

2011-02-28 Thread Antonios Kogias
Thank you Konstantin, for the clarification of details - now I got a 
much better understanding of the issues involved.


My understanding is that the logAccess(...) call happens when the output 
buffer has been flushed and closed (in http/1.0 that would also close 
the tcp connection, thus I called it 'teardown'), and the timestamp 
recorded is of the call time of the logAccess(...).
I would like to use the log's  to measure request 
inter-arrival time intervals.
It seems that to get a valid timestamp for the calculation (i.e. a more 
accurate approximation of the request arrival time), I need to subtract 
the  from the  written in the log.

Can you please confirm this?
(I think that I can get away with considering the Request Arrival Time 
the same as Response Processing Start i.e. negligible time for reading 
and parsing the http request line etc.)


About the processing time recorded  it seems that it 
contains the whole of transmission as well (i.e. pushing the data to the 
network layer and closing the output). Chris put an interesting question 
(thank you for bringing it up) that I'm not sure how to handle at the 
moment (beyond not using such "forwarding" servlets in the initial 
experimental setups):

On 2/28/2011 5:57 PM, Christopher Schultz wrote:
On the other hand, your servlet can issue a "forward" which is 
essentially a server-side redirect that allows a second (or third, or 
fourth, ...) servlet to generate a response after the first servlet does 
it's work. I'm not sure where the Valve chain fits into that (does the 
AccessLogValve time the calls to each individual forward, or does it 
time the entire request/response as the client sees it?), but the answer 
to that question can significantly change the timings that you observe.

Can you provide any feedback on that?

For the modeling scheme to work, the web server needs be configured with 
blocking (traditional sockets) threads on read and - especially - on 
write. I read the Connector configuration 
http://tomcat.apache.org/tomcat-7.0-doc/config/http.html and it states 
in the introduction:
"Each incoming request requires a thread for the duration of that 
request. If more simultaneous requests are received than can be handled 
by the currently available request processing threads, additional 
threads will be created up to the configured maximum (the value of 
the|maxThreads|attribute). If still more simultaneous requests are 
received, they are stacked up inside the server socket created by 
the*Connector*, up to the configured maximum (the value of 
the|acceptCount|attribute. Any further simultaneous requests will 
receive "connection refused" errors, until resources are available to 
process them."
and I'm perfectly happy with that. But at the page bottom (comparison of 
the connectors) I don't understand:

a) How can I choose one of the three connectors to use in server config?
b) What does "Sim Blocking" in the Java Nio Blocking Connectormean?


On 2/27/2011 9:43 PM, Konstantin Kolinko wrote:

2011/2/21 Antonios Kogias:

Thank you very much for the detailed answer. Now there's just one more thing
to ask.
If we use tomcat 7.0.8, the "timing for the whole request processing cycle"
will incorporate transmit time?
e.g. if using HTTP/1.0, will it represent the total time until the teardown
of the connection? Or will it be the net processing time /before/
transmission starts (i.e. time to prepare the http response and push it to
the network layer)?

In TC 7.0.8 and later:

The start time:
= when org.apache.coyote.Request#setStartTime() is called

That is done by processors. Some initial processing is already done at
that point (e.g. reading the request line).

The end time:
= when org.apache.catalina.connector.CoyoteAdapter#service() calls logAccess(..)

That is done when service() completes processing the request. At that
point the content is already generated and response.finishResponse()
is already called (which closes output buffer and writes remaining
data to the socket).

After that Tomcat performs cleaning of its internal state and is ready
to process next request.

I am not sure what you mean by "teardown".


A correction: I wrote:


In latest versions of TC7 (7.0.8 and later) (...)
That version prints timestamp when request was received

That is not true. With %t the AccessLogValve still prints the current
time when logging is performed, not when processing was started.
(There was a patch discussed on dev@ to change the behaviour, but it
has not been applied yet).


BTW, if you want to debug Tomcat,
http://wiki.apache.org/tomcat/FAQ/Developing

Best regards,
Konstantin Kolinko

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





RE: IIS7/isapi/tomcat performance

2011-02-28 Thread Bruce Pease
Thanks for the insight.  It looks like we are going to go with server 2003 32
bit.  I found some references that suggest ajp 1.3 has a performance issue in
64 bit server 2008.

-Original Message-
From: Tony Anecito [mailto:adanec...@yahoo.com] 
Sent: Monday, February 28, 2011 3:01 PM
To: Tomcat Users List
Subject: Re: IIS7/isapi/tomcat performance

I forgot to mention new versions of Windows are slower than XP. So that would

contribute to your issues. Windows 7 got better but not as fast as 32-bit.

Also, you might want to measure from tomcat perspective so you have a new 
baseline.

Regards,
-Tony



- Original Message 
From: Tony Anecito 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 12:57:03 PM
Subject: Re: IIS7/isapi/tomcat performance

Since the memory pointers are larger you may need to increase your heap size
but 

you can compress the address pointers.

Also, if you use JNI and it is 32-bit then you will have unexpected issues
same 
thing with any native libs your try to use.

Generally it will be up to 20% slower due to the pointers.

Recommend you stick to 32-bit if your app fits within the memory space for 
32-bit. I have heard that 64-bit jvm for version 7 might be faster than
32-bit.

Good Luck,
-Tony



- Original Message 
From: Tony Anecito 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 12:40:43 PM
Subject: Re: IIS7/isapi/tomcat performance

JVM settings should not be the same.

Regards,
-Tony



- Original Message 
From: Bruce Pease 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 11:46:35 AM
Subject: RE: IIS7/isapi/tomcat performance

Perhaps my point is being missed here.  The issue is moving from 32 bit is
slower in 64 bit (4-500% if you need a number).  Components are the same,
setup is the same, database is the same, environment is the same, tests are
the same, network is the same.  I'm basically looking to see if anyone is
using a similar setup, and has been able to get it to perform well.

-Original Message-
From: Tony Anecito [mailto:adanec...@yahoo.com] 
Sent: Monday, February 28, 2011 1:40 PM
To: Tomcat Users List
Subject: Re: IIS7/isapi/tomcat performance

I agree with Charles. I run a performance Testing group for a fortune 50
company 
and do alot of performance testing for different designs/implementation for
my 
own startup and we can not help you without further info.

Client side setup (Browser/version?)
Test cases
Network speed
Tomcat Setup (startup command line with jdk options)
Extending logging options such as request time for tomcat
Make sure your logging is set to error and not debug level on your processes 
(IIS, Tomcat, Database?)

I would use yslow with FF to get page sizes and other info. developers seem
to 
forget that the bandwidth is limited and 1MB pages are too big. Sometimes
images 
are small but the javascript is quite big especially when calling web
services 
directly,
For the middle tier a code profiler like visualvm helps quite a bit.

The key thing is narrow it down tier by tier then focus on the tier where you

see the biggest gains.
If manually you see x seconds then that is the best it will be before you
start 
tuning.
Gains in code will always be larger than that by configuration tuning unless 
logging level is set to high especially for jdbc calls.

Good luck,
Tony Anecito (JavaOne 2010 "I am the future of Java winner")
Founder,
MyUniPortal (JavaOne 2010 "Duke's Award Winner")
http://www.myuniportal.com


 


- Original Message 
From: "Caldarale, Charles R" 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 11:15:40 AM
Subject: RE: IIS7/isapi/tomcat performance

> From: Bruce Pease [mailto:bpe...@wth.com] 
> Subject: IIS7/isapi/tomcat performance

> In performance tests I have found the configuration runs
> dramatically slower than it's corresponding server in 32
> bit Windows on 2000 Server and Tomcat 6.

Until you quantify "dramatically", better describe your testing scenario 
(including configurations of all components), eliminate as many moving pieces
as 
you can (e.g., try Tomcat standalone), and do some basic bottleneck analysis,

there's not much anyone can help you with.

- 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


      

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


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

Re: IIS7/isapi/tomcat performance

2011-02-28 Thread Tony Anecito
I forgot to mention new versions of Windows are slower than XP. So that would 
contribute to your issues. Windows 7 got better but not as fast as 32-bit.

Also, you might want to measure from tomcat perspective so you have a new 
baseline.

Regards,
-Tony



- Original Message 
From: Tony Anecito 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 12:57:03 PM
Subject: Re: IIS7/isapi/tomcat performance

Since the memory pointers are larger you may need to increase your heap size 
but 

you can compress the address pointers.

Also, if you use JNI and it is 32-bit then you will have unexpected issues same 
thing with any native libs your try to use.

Generally it will be up to 20% slower due to the pointers.

Recommend you stick to 32-bit if your app fits within the memory space for 
32-bit. I have heard that 64-bit jvm for version 7 might be faster than 32-bit.

Good Luck,
-Tony



- Original Message 
From: Tony Anecito 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 12:40:43 PM
Subject: Re: IIS7/isapi/tomcat performance

JVM settings should not be the same.

Regards,
-Tony



- Original Message 
From: Bruce Pease 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 11:46:35 AM
Subject: RE: IIS7/isapi/tomcat performance

Perhaps my point is being missed here.  The issue is moving from 32 bit is
slower in 64 bit (4-500% if you need a number).  Components are the same,
setup is the same, database is the same, environment is the same, tests are
the same, network is the same.  I'm basically looking to see if anyone is
using a similar setup, and has been able to get it to perform well.

-Original Message-
From: Tony Anecito [mailto:adanec...@yahoo.com] 
Sent: Monday, February 28, 2011 1:40 PM
To: Tomcat Users List
Subject: Re: IIS7/isapi/tomcat performance

I agree with Charles. I run a performance Testing group for a fortune 50
company 
and do alot of performance testing for different designs/implementation for
my 
own startup and we can not help you without further info.

Client side setup (Browser/version?)
Test cases
Network speed
Tomcat Setup (startup command line with jdk options)
Extending logging options such as request time for tomcat
Make sure your logging is set to error and not debug level on your processes 
(IIS, Tomcat, Database?)

I would use yslow with FF to get page sizes and other info. developers seem
to 
forget that the bandwidth is limited and 1MB pages are too big. Sometimes
images 
are small but the javascript is quite big especially when calling web
services 
directly,
For the middle tier a code profiler like visualvm helps quite a bit.

The key thing is narrow it down tier by tier then focus on the tier where you

see the biggest gains.
If manually you see x seconds then that is the best it will be before you
start 
tuning.
Gains in code will always be larger than that by configuration tuning unless 
logging level is set to high especially for jdbc calls.

Good luck,
Tony Anecito (JavaOne 2010 "I am the future of Java winner")
Founder,
MyUniPortal (JavaOne 2010 "Duke's Award Winner")
http://www.myuniportal.com


 


- Original Message 
From: "Caldarale, Charles R" 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 11:15:40 AM
Subject: RE: IIS7/isapi/tomcat performance

> From: Bruce Pease [mailto:bpe...@wth.com] 
> Subject: IIS7/isapi/tomcat performance

> In performance tests I have found the configuration runs
> dramatically slower than it's corresponding server in 32
> bit Windows on 2000 Server and Tomcat 6.

Until you quantify "dramatically", better describe your testing scenario 
(including configurations of all components), eliminate as many moving pieces
as 
you can (e.g., try Tomcat standalone), and do some basic bottleneck analysis,

there's not much anyone can help you with.

- 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


      

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


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




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




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.ap

Re: IIS7/isapi/tomcat performance

2011-02-28 Thread Tony Anecito
Since the memory pointers are larger you may need to increase your heap size 
but 
you can compress the address pointers.

Also, if you use JNI and it is 32-bit then you will have unexpected issues same 
thing with any native libs your try to use.

Generally it will be up to 20% slower due to the pointers.

Recommend you stick to 32-bit if your app fits within the memory space for 
32-bit. I have heard that 64-bit jvm for version 7 might be faster than 32-bit.

Good Luck,
-Tony



- Original Message 
From: Tony Anecito 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 12:40:43 PM
Subject: Re: IIS7/isapi/tomcat performance

JVM settings should not be the same.

Regards,
-Tony



- Original Message 
From: Bruce Pease 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 11:46:35 AM
Subject: RE: IIS7/isapi/tomcat performance

Perhaps my point is being missed here.  The issue is moving from 32 bit is
slower in 64 bit (4-500% if you need a number).  Components are the same,
setup is the same, database is the same, environment is the same, tests are
the same, network is the same.  I'm basically looking to see if anyone is
using a similar setup, and has been able to get it to perform well.

-Original Message-
From: Tony Anecito [mailto:adanec...@yahoo.com] 
Sent: Monday, February 28, 2011 1:40 PM
To: Tomcat Users List
Subject: Re: IIS7/isapi/tomcat performance

I agree with Charles. I run a performance Testing group for a fortune 50
company 
and do alot of performance testing for different designs/implementation for
my 
own startup and we can not help you without further info.

Client side setup (Browser/version?)
Test cases
Network speed
Tomcat Setup (startup command line with jdk options)
Extending logging options such as request time for tomcat
Make sure your logging is set to error and not debug level on your processes 
(IIS, Tomcat, Database?)

I would use yslow with FF to get page sizes and other info. developers seem
to 
forget that the bandwidth is limited and 1MB pages are too big. Sometimes
images 
are small but the javascript is quite big especially when calling web
services 
directly,
For the middle tier a code profiler like visualvm helps quite a bit.

The key thing is narrow it down tier by tier then focus on the tier where you

see the biggest gains.
If manually you see x seconds then that is the best it will be before you
start 
tuning.
Gains in code will always be larger than that by configuration tuning unless 
logging level is set to high especially for jdbc calls.

Good luck,
Tony Anecito (JavaOne 2010 "I am the future of Java winner")
Founder,
MyUniPortal (JavaOne 2010 "Duke's Award Winner")
http://www.myuniportal.com


 


- Original Message 
From: "Caldarale, Charles R" 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 11:15:40 AM
Subject: RE: IIS7/isapi/tomcat performance

> From: Bruce Pease [mailto:bpe...@wth.com] 
> Subject: IIS7/isapi/tomcat performance

> In performance tests I have found the configuration runs
> dramatically slower than it's corresponding server in 32
> bit Windows on 2000 Server and Tomcat 6.

Until you quantify "dramatically", better describe your testing scenario 
(including configurations of all components), eliminate as many moving pieces
as 
you can (e.g., try Tomcat standalone), and do some basic bottleneck analysis,

there's not much anyone can help you with.

- 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


      

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


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




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




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



Re: IIS7/isapi/tomcat performance

2011-02-28 Thread Tony Anecito
JVM settings should not be the same.

Regards,
-Tony



- Original Message 
From: Bruce Pease 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 11:46:35 AM
Subject: RE: IIS7/isapi/tomcat performance

Perhaps my point is being missed here.  The issue is moving from 32 bit is
slower in 64 bit (4-500% if you need a number).  Components are the same,
setup is the same, database is the same, environment is the same, tests are
the same, network is the same.  I'm basically looking to see if anyone is
using a similar setup, and has been able to get it to perform well.

-Original Message-
From: Tony Anecito [mailto:adanec...@yahoo.com] 
Sent: Monday, February 28, 2011 1:40 PM
To: Tomcat Users List
Subject: Re: IIS7/isapi/tomcat performance

I agree with Charles. I run a performance Testing group for a fortune 50
company 
and do alot of performance testing for different designs/implementation for
my 
own startup and we can not help you without further info.

Client side setup (Browser/version?)
Test cases
Network speed
Tomcat Setup (startup command line with jdk options)
Extending logging options such as request time for tomcat
Make sure your logging is set to error and not debug level on your processes 
(IIS, Tomcat, Database?)

I would use yslow with FF to get page sizes and other info. developers seem
to 
forget that the bandwidth is limited and 1MB pages are too big. Sometimes
images 
are small but the javascript is quite big especially when calling web
services 
directly,
For the middle tier a code profiler like visualvm helps quite a bit.

The key thing is narrow it down tier by tier then focus on the tier where you

see the biggest gains.
If manually you see x seconds then that is the best it will be before you
start 
tuning.
Gains in code will always be larger than that by configuration tuning unless 
logging level is set to high especially for jdbc calls.

Good luck,
Tony Anecito (JavaOne 2010 "I am the future of Java winner")
Founder,
MyUniPortal (JavaOne 2010 "Duke's Award Winner")
http://www.myuniportal.com


 


- Original Message 
From: "Caldarale, Charles R" 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 11:15:40 AM
Subject: RE: IIS7/isapi/tomcat performance

> From: Bruce Pease [mailto:bpe...@wth.com] 
> Subject: IIS7/isapi/tomcat performance

> In performance tests I have found the configuration runs
> dramatically slower than it's corresponding server in 32
> bit Windows on 2000 Server and Tomcat 6.

Until you quantify "dramatically", better describe your testing scenario 
(including configurations of all components), eliminate as many moving pieces
as 
you can (e.g., try Tomcat standalone), and do some basic bottleneck analysis,

there's not much anyone can help you with.

- 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


      

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


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




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



Re: Getting the Tomcat shutdown port

2011-02-28 Thread Olivier Lefevre

On 2/28/2011 6:09 PM, Caldarale, Charles R wrote:

The servlet, or the webapp?


The webapp in this case: the servlet that might fail is the
"worker" servlet, the others more in a supporting role (e.g.,
UI). So if it fails the whole webapp should shut down.


Why don't you simply throw a ServletException in the init()

> method of the servlets of interest?

OK. But how to communicate to the other servlets of the
webapp that they, too, should commit suicide?

Are they guaranteed to be created in a certain order? In that
case I'd put the worker servlet ahead and then maybe there is
a way to leave a breadcrumb behind after its death as a sign
to the others that they should not proceed.

-- O.L.


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



Re: Getting the Tomcat shutdown port

2011-02-28 Thread Mark Thomas
On 28/02/2011 19:13, Olivier Lefevre wrote:
> I know it's an interface I have to implement but without some
> concrete class "close" to my problem to look at for guidance
> LifecycleListener in and of itself does not help me much.

Ah, OK. Try this:

http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/security/SecurityListener.java?view=annotate

Mark

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



Re: Getting the Tomcat shutdown port

2011-02-28 Thread Olivier Lefevre

On 2/28/2011 6:06 PM, Mark Thomas wrote:

If you want to stop a single Servlet then Servlet.init() is the
place to it. See section 2.3.2 of the Servlet 3.0 spec.


I.e., the exception throwing approach suggested by C. Caldarale in
the next answer. Yes, it's neat. So I was overcomplicating it.


org.apache.catalina.LifecycleListener was what I meant


I know it's an interface I have to implement but without some
concrete class "close" to my problem to look at for guidance
LifecycleListener in and of itself does not help me much.

-- O.L.


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



RE: IIS7/isapi/tomcat performance

2011-02-28 Thread Bruce Pease
Perhaps my point is being missed here.  The issue is moving from 32 bit is
slower in 64 bit (4-500% if you need a number).  Components are the same,
setup is the same, database is the same, environment is the same, tests are
the same, network is the same.  I'm basically looking to see if anyone is
using a similar setup, and has been able to get it to perform well.

-Original Message-
From: Tony Anecito [mailto:adanec...@yahoo.com] 
Sent: Monday, February 28, 2011 1:40 PM
To: Tomcat Users List
Subject: Re: IIS7/isapi/tomcat performance

I agree with Charles. I run a performance Testing group for a fortune 50
company 
and do alot of performance testing for different designs/implementation for
my 
own startup and we can not help you without further info.

Client side setup (Browser/version?)
Test cases
Network speed
Tomcat Setup (startup command line with jdk options)
Extending logging options such as request time for tomcat
Make sure your logging is set to error and not debug level on your processes 
(IIS, Tomcat, Database?)

I would use yslow with FF to get page sizes and other info. developers seem
to 
forget that the bandwidth is limited and 1MB pages are too big. Sometimes
images 
are small but the javascript is quite big especially when calling web
services 
directly,
For the middle tier a code profiler like visualvm helps quite a bit.

The key thing is narrow it down tier by tier then focus on the tier where you

see the biggest gains.
If manually you see x seconds then that is the best it will be before you
start 
tuning.
Gains in code will always be larger than that by configuration tuning unless 
logging level is set to high especially for jdbc calls.

Good luck,
Tony Anecito (JavaOne 2010 "I am the future of Java winner")
Founder,
MyUniPortal (JavaOne 2010 "Duke's Award Winner")
http://www.myuniportal.com


 


- Original Message 
From: "Caldarale, Charles R" 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 11:15:40 AM
Subject: RE: IIS7/isapi/tomcat performance

> From: Bruce Pease [mailto:bpe...@wth.com] 
> Subject: IIS7/isapi/tomcat performance

> In performance tests I have found the configuration runs
> dramatically slower than it's corresponding server in 32
> bit Windows on 2000 Server and Tomcat 6.

Until you quantify "dramatically", better describe your testing scenario 
(including configurations of all components), eliminate as many moving pieces
as 
you can (e.g., try Tomcat standalone), and do some basic bottleneck analysis,

there's not much anyone can help you with.

- 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


  

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


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



Re: IIS7/isapi/tomcat performance

2011-02-28 Thread Tony Anecito
I agree with Charles. I run a performance Testing group for a fortune 50 
company 
and do alot of performance testing for different designs/implementation for my 
own startup and we can not help you without further info.

Client side setup (Browser/version?)
Test cases
Network speed
Tomcat Setup (startup command line with jdk options)
Extending logging options such as request time for tomcat
Make sure your logging is set to error and not debug level on your processes 
(IIS, Tomcat, Database?)

I would use yslow with FF to get page sizes and other info. developers seem to 
forget that the bandwidth is limited and 1MB pages are too big. Sometimes 
images 
are small but the javascript is quite big especially when calling web services 
directly,
For the middle tier a code profiler like visualvm helps quite a bit.

The key thing is narrow it down tier by tier then focus on the tier where you 
see the biggest gains.
If manually you see x seconds then that is the best it will be before you start 
tuning.
Gains in code will always be larger than that by configuration tuning unless 
logging level is set to high especially for jdbc calls.

Good luck,
Tony Anecito (JavaOne 2010 "I am the future of Java winner")
Founder,
MyUniPortal (JavaOne 2010 "Duke's Award Winner")
http://www.myuniportal.com


 


- Original Message 
From: "Caldarale, Charles R" 
To: Tomcat Users List 
Sent: Mon, February 28, 2011 11:15:40 AM
Subject: RE: IIS7/isapi/tomcat performance

> From: Bruce Pease [mailto:bpe...@wth.com] 
> Subject: IIS7/isapi/tomcat performance

> In performance tests I have found the configuration runs
> dramatically slower than it's corresponding server in 32
> bit Windows on 2000 Server and Tomcat 6.

Until you quantify "dramatically", better describe your testing scenario 
(including configurations of all components), eliminate as many moving pieces 
as 
you can (e.g., try Tomcat standalone), and do some basic bottleneck analysis, 
there's not much anyone can help you with.

- 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




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



RE: IIS7/isapi/tomcat performance

2011-02-28 Thread Caldarale, Charles R
> From: Bruce Pease [mailto:bpe...@wth.com] 
> Subject: IIS7/isapi/tomcat performance

> In performance tests I have found the configuration runs
> dramatically slower than it's corresponding server in 32
> bit Windows on 2000 Server and Tomcat 6.

Until you quantify "dramatically", better describe your testing scenario 
(including configurations of all components), eliminate as many moving pieces 
as you can (e.g., try Tomcat standalone), and do some basic bottleneck 
analysis, there's not much anyone can help you with.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



IIS7/isapi/tomcat performance

2011-02-28 Thread Bruce Pease
Good Afternoon:

 

I am attempting to run a Windows x64 server with IIS7 and Tomcat 7.  I have
64 bit versions of JDK (1.6.26) and Tomcat (7.0.8).  The server is set up
with IIS using ajp1.3 to a local cluster of Tomcat servers.  In performance
tests I have found the configuration runs dramatically slower than it's
corresponding server in 32 bit Windows on 2000 Server and Tomcat 6.  Is there
a way to improve performance or is there an issue with this setup on Windows
64 IIS 7?

 

Thanks,

 

Bruce D. Pease
Technical Team Lead - Web Applications
CruiseOne(r)   & Cruises Inc(tm)
 
1201 W. Cypress Creek Road, Suite 100
Fort Lauderdale, FL 33309-1955
954-958-3654 (direct) | 954-958-3665 (fax)
bpe...@wth.com  

 



RE: Getting the Tomcat shutdown port

2011-02-28 Thread Caldarale, Charles R
> From: Olivier Lefevre [mailto:lefev...@yahoo.com] 
> Subject: Re: Getting the Tomcat shutdown port

> > Your application may be on a shared Tomcat instance someday
> > and System.exit is really bad in that case.

> So let's kill the servlet instead.

The servlet, or the webapp?

> But it's still unclear how you'd do that because from the 
> ServletConfig you can get the ServletContext but from the
> ServletContext you can no longer get the Servlet:

There's no "the Servlet"; the ServletContext is for the webapp, which may be 
comprised of many servlets.

Why don't you simply throw a ServletException in the init() method of the 
servlets of interest?

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Getting the Tomcat shutdown port

2011-02-28 Thread Mark Thomas
On 28/02/2011 16:59, Olivier Lefevre wrote:
>> Your application may be on a shared Tomcat instance someday
>> and System.exit is really bad in that case.
> 
> True. So let's kill the servlet instead.

If you want to stop a single Servlet then Servlet.init() is the place to
it. See section 2.3.2 of the Servlet 3.0 spec.

>> If you really do want to control Tomcat startup, a LifecycleListener
>> is a better approach but Tomcat specific.
> 
> There are plenty of LifecycleListener classes in the API; which
> one would work best: ServerLifecycleListener?

org.apache.catalina.LifecycleListener was what I meant

Mark

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



Re: Getting the Tomcat shutdown port

2011-02-28 Thread Olivier Lefevre

Your application may be on a shared Tomcat instance someday
and System.exit is really bad in that case.


True. So let's kill the servlet instead. But it's still unclear
how you'd do that because from the ServletConfig you can get the
ServletContext but from the ServletContext you can no longer get
the Servlet: that has been deprecated and that getter now returns
null. But perhaps I am looking in the wrong direction: the
Servlet.destroy APIdoc says "Called by the servlet container to
indicate to a servlet that the servlet is being taken out of service."
which implies that the teardown is initiated elsewhere and that
simply calling destroy wouldn't do anything useful.


If you really do want to control Tomcat startup, a LifecycleListener

> is a better approach but Tomcat specific.

There are plenty of LifecycleListener classes in the API; which
one would work best: ServerLifecycleListener?

-- O.L.


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



Re: Getting the Tomcat shutdown port

2011-02-28 Thread Mark Thomas
On 28/02/2011 16:12, Olivier Lefevre wrote:
>> Doing this from a servlet begs the question how you are going
>> to restart it.
> 
> Not an issue: I want to shut it down at startup if some needed
> resources cannot be found. No pint restarting it then.

Fair enough. I wouldn't do it in a Servlet.init() though. A
ServletContextListener that stops the app starting is probably better.
Your application may be on a shared Tomcat instance someday and
System.exit is really bad in that case.

If you really do want to control Tomcat startup, a LifecycleListener is
a better approach but Tomcat specific.

>> I'm also curious why you want tot do this but System.exit() will
>> have exactly the same result as using the shutdown port.
> 
> Does Tomcat set up appropriate shutdown hooks when it starts?
> Otherwise tearing down the VM could cause damage to external
> resources at least.

Yes, which is why I wrote "System.exit() will have exactly the same
result as using the shutdown port.".

Mark

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



Re: Getting the Tomcat shutdown port

2011-02-28 Thread Olivier Lefevre

Doing this from a servlet begs the question how you are going
to restart it.


Not an issue: I want to shut it down at startup if some needed
resources cannot be found. No pint restarting it then.


I'm also curious why you want tot do this but System.exit() will
have exactly the same result as using the shutdown port.


Does Tomcat set up appropriate shutdown hooks when it starts?
Otherwise tearing down the VM could cause damage to external
resources at least.

-- O.L.



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



Re: how to caculate the PV,ip,PU according to the tomcat log

2011-02-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

To whom it may concern,

On 2/24/2011 8:34 AM, maven apache wrote:
>> Good question. What are PV, ip, and PU?
> 
> Thanks for your attention and Sorry for my negligence.
> 
> PV: page view, how many people visit a page.
> 
> IP: how many ips visitor the website within one day or one hour...
> 
> PU:Unique Visitor,
> 
> For example:
> 
> visitor A(ip:10.0.0.1) scan the site :http://www.xx.com/index.html
> http://www.xx.com/about.html
> 
> Visitor B (ip:10.0.0.2) scan the same two pages
> 
> Then VIsitor A change his/her ip to 10.0.0.3 (but its cookie in her/his
> browser is not change) and visitor the two pages again.
> 
> Then from all of the above,the
> ips=3 (three distinct ips)
> pv=2 (two pages)
> PU=2 (just two different person,although three ip.
> 
> Is this clear?
> 
> If not,I can add more. :)

No, it makes sense.

First, you asked about using the log for stats, and then showed an
example SQL query. Are you using a RDBMS-based log?

At any rate, what you need is a good set of SQL queries -- you might
want to talk to a DBA about how to do these things properly.

If you are using a log file, try searching Google for "web server log
file analyzer". We use Awfful for basic stats tracking.

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

iEYEARECAAYFAk1ryH0ACgkQ9CaO5/Lv0PDgfACfUVKTSFfbCSOYY8FNmiUV9pUL
CqQAoIoYrq5xonD+G8lOu0ytIK7dIis1
=t8wN
-END PGP SIGNATURE-

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



Re: [OT] Memory Leak in Tomcat

2011-02-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

הילה,

On 2/28/2011 5:17 AM, הילה wrote:
> How can I encrypt the password inside the xml file?

0. $file = conf/server.xml
1. Use your favorite encryption tool to encrypt the password and shove
   it into $file
2. Use that same tool in some code you hack-into Tomcat to read it
   back out.
3. Store the key to your favorite-tool encryption package in another
   file (say, s3cr3t.key)
4. $file = s3cr3t.key
5. Go to step 1.

Repeat this process until you feel like you're safe. (Hint: you are
still not safe). Scratch that: repeat this process until your boss or
your auditor feel like they are safe.

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

iEYEARECAAYFAk1rxwwACgkQ9CaO5/Lv0PCtGQCgtxVxV9+N0AvRuYw0U6mi9ki1
ikgAn1xQNqRRtSKby531xKRHizxzEFwD
=uuFd
-END PGP SIGNATURE-

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



Re: AccessLogValve pattern (timestamp, bytes sent and time taken)

2011-02-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Antonios,

On 2/24/2011 11:28 AM, Antonios Kogias wrote:
> And I would like some clarification on "Depending on exactly where the
> Valve falls within the Valve chain and how the RequestDispatcher works
> with Valves, it may or may not include time to render the response at all."

If your servlet redirects to a dynamic response, then the time for the
first request necessarily does not include the time to render a response
(unless you consider issuing a 30x status to be "rendering the
response"). That seems clear to me.

On the other hand, your servlet can issue a "forward" which is
essentially a server-side redirect that allows a second (or third, or
fourth, ...) servlet to generate a response after the first servlet does
it's work. I'm not sure where the Valve chain fits into that (does the
AccessLogValve time the calls to each individual forward, or does it
time the entire request/response as the client sees it?), but the answer
to that question can significantly change the timings that you observe.

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

iEYEARECAAYFAk1rxdEACgkQ9CaO5/Lv0PCmDQCeLofJSFjkIDeFElfWU9Q10sc2
sQUAni1wjqcATxwpi8+Y5Z8i8yr5qN71
=7144
-END PGP SIGNATURE-

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



Re: Detecting resource usage

2011-02-28 Thread Mark Thomas
On 28/02/2011 15:50, laredotornado wrote:
> 
> Hi,
> 
> We are using Tomcat 6.0.24 running on two different machines.  In our
> workers.properties file, we have
> 
> worker.worker1.fail_on_status=500,503
> 
> to cause instances to gracefully fail over if there is a problem on one
> instance.  This is great, but if one app server is repeatedly failing over
> to the second app server (in which case only one is handling all our
> traffic), how can we pro-actively detect that there is a problem with the
> first app server?

That will depend on what is triggering the failures.

Mark

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



Re: Getting the Tomcat shutdown port

2011-02-28 Thread Mark Thomas
On 28/02/2011 15:34, Olivier Lefevre wrote:
> Is there a programmatic way to retrieve it from within
> a webapp, more exactly from within Servlet.init()? I
> can't find one. Same question for the actual command.
> 
> As you may have guessed, I want to shut down Tomcat by
> opening a socket and sending it a SHUTDOWN or whatever.
> Maybe there is a less low-level way to do it but I can't
> find it either.

Doing this from a servlet begs the question how you are going to restart
it. I'm also curious why you want tot do this but System.exit() will
have exactly the same result as using the shutdown port.

Mark

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



Re: Problem with overriding parameters via context.xml

2011-02-28 Thread Mark Thomas
On 28/02/2011 14:51, Rainer Frey wrote:
> On Friday 25 February 2011 17:21:07 Mark Thomas wrote:
>> On 25/02/2011 16:14, chris derham wrote:
>>> Oliver said that the defect I was asking about was 50700. This appears to
>>> have been fixed now. So when is the next release of tomcat scheduled? I
>>> searched the tomcat pages, but can't see a page listing anticipated
>>> launch dates. I know open source projects don't tend to be so rigid, but
>>> is there a date penciled in?
>>
>> 7.0.9 probably in the next few weeks. I have been trying to stick to a
>> release every month or so.
>>
>> 6.0.33 is likely to be several months away. I don't see anything in the
>> change log that is likely to prompt an earlier release.
> 
> Ouch. 50700 is an absolute blocker for me. I'm stuck with 6.0.29 because of 
> this, and having a useable release with the numerous fixes from 6.0.30 would 
> be good.

What's wrong with 7.0.9? I am in the processing of uploading the files
for the release vote now. The ASF Jira instance has been happily running
7.0.x since 7.0.6 was announced as stable.

Mark

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



Detecting resource usage

2011-02-28 Thread laredotornado

Hi,

We are using Tomcat 6.0.24 running on two different machines.  In our
workers.properties file, we have

worker.worker1.fail_on_status=500,503

to cause instances to gracefully fail over if there is a problem on one
instance.  This is great, but if one app server is repeatedly failing over
to the second app server (in which case only one is handling all our
traffic), how can we pro-actively detect that there is a problem with the
first app server?

Thanks, - Dave
-- 
View this message in context: 
http://old.nabble.com/Detecting-resource-usage-tp31030814p31030814.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Getting the Tomcat shutdown port

2011-02-28 Thread Olivier Lefevre

Is there a programmatic way to retrieve it from within
a webapp, more exactly from within Servlet.init()? I
can't find one. Same question for the actual command.

As you may have guessed, I want to shut down Tomcat by
opening a socket and sending it a SHUTDOWN or whatever.
Maybe there is a less low-level way to do it but I can't
find it either.

Thanks,

-- O.L.


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



Re: Problem with overriding parameters via context.xml

2011-02-28 Thread Rainer Frey
On Friday 25 February 2011 17:21:07 Mark Thomas wrote:
> On 25/02/2011 16:14, chris derham wrote:
> > Oliver said that the defect I was asking about was 50700. This appears to
> > have been fixed now. So when is the next release of tomcat scheduled? I
> > searched the tomcat pages, but can't see a page listing anticipated
> > launch dates. I know open source projects don't tend to be so rigid, but
> > is there a date penciled in?
> 
> 7.0.9 probably in the next few weeks. I have been trying to stick to a
> release every month or so.
> 
> 6.0.33 is likely to be several months away. I don't see anything in the
> change log that is likely to prompt an earlier release.

Ouch. 50700 is an absolute blocker for me. I'm stuck with 6.0.29 because of 
this, and having a useable release with the numerous fixes from 6.0.30 would 
be good.

> Mark

Rainer

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



RE: [OT] Memory Leak in Tomcat

2011-02-28 Thread Caldarale, Charles R
> From: הילה [mailto:hilavalen...@gmail.com] 
> Subject: Re: [OT] Memory Leak in Tomcat

> How can I encrypt the password inside the xml file?

Short answer: pointless exercise.

Long answer: search the archives.

 - 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.



Re: [OT] Memory Leak in Tomcat

2011-02-28 Thread הילה
continue to the discussion-
How can I encrypt the password inside the xml file?

Thanks
Hila


בתאריך 27 בפברואר 2011 19:37, מאת הילה :

> Original:
> Does this happen all the time? Under what conditions? Are you able to
> build a patched version of Tomcat in a test environment to test a fix I
> have? What version of Java and Tomcat are you running?
>
> Hey
> I'm not sure if you refer the question to me, since the whole topic shifted
> to an off topic :]
> But yes, it happens all the time. what do you mean "under what conditions?"
>
> As I specified in my first mail, it happens when I implement windows
> authentication on tomcat
> I use tomcat 6.0.29 , on OS win server 2008 R2 standard, JDK 1.6 Build 23
>
> If you have a fix, I'll happy to try it on our test environment.
>
> Thanks
> Hila
>
>
> 2011/2/25 Christopher Schultz 
>
> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> André,
>>
>> On 2/25/2011 10:47 AM, André Warnier wrote:
>> > [Thread hijacking] is more annoying, because quite a few people have
>> their client set
>> > to display messages "by thread" (a hierarchical display where messages
>> > neatly appear under the ones they respond to, instead of just
>> > chronologically).  The client classifies new messages as being "part of
>> > a thread" using information contained in other headers within the
>> > message (kind of a "refers to" thing).  These headers are automatically
>> > added by the list server.
>> > So when you respond to an existing message and change the subject, for
>> > these people an unrelated message suddenly appears inside a discussion
>> > "tree" where your new message does not belong.
>>
>> Worse are mail clients who think that "subject" and "thread" are
>> interchangeable: the thread-id in the SMTP headers is ignored and
>> instead the subject is used to thread things. That way, two things happen:
>>
>> 1. People who hijack threads can't tell and get all angry when we tell
>> them they hijacked the thread
>>
>> 2. Legitimate thread-subject-changes (such as adding [OT] or whatever)
>> end up showing-up in what looks like a separate thread.
>>
>> > Please do [chip in].  That's the point of this list.
>> > Specially interventions like yours, which is civil, well-written and
>> > brings valuable information and insights.
>>
>> Mostly everyone here will ignore most of the list-etiquette rules and
>> remain civil if you have something worthwhile to say. Top-posting is
>> only irritating when it looks like this:
>>
>> Reply:
>>
>> Yes, no, and maybe. There are other times this happens. 1.6. 5.something.
>>
>> Original:
>> Does this happen all the time? Under what conditions? Are you able to
>> build a patched version of Tomcat in a test environment to test a fix I
>> have? What version of Java and Tomcat are you running?
>>
>> Since Chris's post had actual content and didn't really have a
>> point-counterpoint feel to it, top-posting can be forgiven :)
>>
>> - -chris
>> -BEGIN PGP SIGNATURE-
>> Version: GnuPG v1.4.10 (MingW32)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>
>> iEYEARECAAYFAk1n8uwACgkQ9CaO5/Lv0PDHNQCfXscF1JWtPIXeu3DMzLgFbg/A
>> CmYAnA/117/lOPYzoKPvU9DOX29BeEFS
>> =Xzcc
>> -END PGP SIGNATURE-
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>


Re: tomcat 7 for production

2011-02-28 Thread Mark Thomas
On 28/02/2011 08:31, Daniel Plappert wrote:
> Hi all,
> 
> since tomcat 7 is a stable release, I am wondering if it's ready for a 
> production use? 
> Which one (tomcat 6 or tomcat 7) is recommended for a production use?

Tomcat 7. The ASF has been using it since 7.0.6 (the first stable
release) for the JIRA installation without any issues.

Note that 7.0.8 is the latest version and the release process for 7.0.9
is likely to start later today.

Mark

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



tomcat 7 for production

2011-02-28 Thread Daniel Plappert
Hi all,

since tomcat 7 is a stable release, I am wondering if it's ready for a 
production use? 
Which one (tomcat 6 or tomcat 7) is recommended for a production use?


Best regards,
Daniel



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