Configuring timeouts for apache + mod_jk + tomcat

2010-02-15 Thread Alessandro Bahgat
Hello,
I'm writing because at last we are about to upgrade the Apache
httpd+mod_jk we use in the production environment from version 2.0.52
to version 2.2.14 (on Linux Servers), and I'd like to receive advice
from you about timeout settings.

For some reason I don't know, the system has the following *odd* configuration:
* Apache Timeout directive is not used (I assume that it times out
after the default 300 seconds)
* mod_jk is configured with connection_pool_timeout=5 
socket_timeout=5 (and it also has connection_pool_size=1)
* Tomcat has its AJP connector configured to timeout after 30 milliseconds

I believe that the mod_jk timeouts are a bit too low, especially if
compared to the other ones.

We are experiencing a strange behaviour with our current
configuration, and I believe it may be related to the configuration
settings: many Tomcat threads get stuck while flushing the output
buffer (in particular when the system is under heavy load), as if
there were no other thread on the Apache side to receive their input.

Do you think it is reasonable to have timeout values that differ so
much between mod_jk and Tomcat?
I'd rather us a connection_pool_timeout that's comparable to the
Apache timeout, especially because we need to get rid of anything that
may cause our workers to behave in such a weird manner.

Thank you for any help you can give.

Regards,
Alessandro

PS this post is related to this thread:
http://mail-archives.apache.org/mod_mbox/tomcat-users/200911.mbox/%3cce3aa0b60911180337o6469bdb4tcf3a90b44cea4...@mail.gmail.com%3

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



Performance issues when adding Tomcat JK redirector to IIS's Default Web Site?

2010-02-15 Thread Steve Ryan
Dear All

 

I've tried googling this but can't find much, so I was hoping one of you
guys might be able to help me.

 

My web application lives under IIS's Default Web Site. It needs to use the
Tomcat JK redirector, so I have added the redirector as an ISAPI Filter on
the Default Web Site. This means any websites which live under the
Default Web Site will use the redirector. 

 

This is fine, however, there are other third-party websites which live under
IIS's Default Web Site, which means the change I made above (adding the
redirector as an ISAPI Filter on the Default Web Site) also affects these
third party websites.

 

So my question is this:

 

Are there any known performance issues with the Tomcat JK redirector, in
particular, any performance issues which could affect the third-party
websites as explained in my example above?

 

Any advice appreciated.

 

Cheers

 

Steve



Re: Performance issues when adding Tomcat JK redirector to IIS's Default Web Site?

2010-02-15 Thread Peter Crowther
Steve, you're likely to get more specific answers if you can tell us
versions: what version of the redirector, and what versions of IIS?
Also, can you tell us whose instructions you followed to get it
working, as there are some out there that are... how shall I say it...
less than ideal :-).

Cheers,

- Peter

On 15 February 2010 11:30, Steve Ryan st...@acme.ie wrote:
 Dear All



 I've tried googling this but can't find much, so I was hoping one of you
 guys might be able to help me.



 My web application lives under IIS's Default Web Site. It needs to use the
 Tomcat JK redirector, so I have added the redirector as an ISAPI Filter on
 the Default Web Site. This means any websites which live under the
 Default Web Site will use the redirector.



 This is fine, however, there are other third-party websites which live under
 IIS's Default Web Site, which means the change I made above (adding the
 redirector as an ISAPI Filter on the Default Web Site) also affects these
 third party websites.



 So my question is this:



 Are there any known performance issues with the Tomcat JK redirector, in
 particular, any performance issues which could affect the third-party
 websites as explained in my example above?



 Any advice appreciated.



 Cheers



 Steve



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



Tomcat 6 is getting down

2010-02-15 Thread vramanaj

Tomcat is getting down automatically, after few seconds of starting it.
Attached is the tomcat log. Could n't able to identify the issue. Please
help me out.
-- 
View this message in context: 
http://old.nabble.com/Tomcat-6-is-getting-down-tp27593280p27593280.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



RE: Performance issues when adding Tomcat JK redirector to IIS's Default Web Site?

2010-02-15 Thread Steve Ryan
Hi Peter

Thanks for your reply.

To answer your questions:

I am using IIS 6 and IIS 7.
I am using the latest version of the redirector, i.e. JK-1.2.28.

Our technical architect decided how we should use the redirector. This is
the basic design:

IIS 
- Default Web Site (ISAPI Filter = isapi_redirect.dll)
--- Virtual directory for our web application
--- Virtual directory for the redirector
--- Virtual directory for other third-party website

IIS Application Pools
- DefaultAppPool (may be used by Other third-party website)
- AppPool for our web application
- AppPool for the redirector

So as you can see, all the virtual directories live under the Default Web
Site. 

The isapi_redirect.dll is added as an ISAPI Filter for the entire Default
Web Site, which means all the virtual directories under Default Web Site
will be affected by this. My worry is it might impact Other third-party
website.

Thanks for your help.

Cheers

Steve

-Original Message-
From: peter.crowth...@googlemail.com [mailto:peter.crowth...@googlemail.com]
On Behalf Of Peter Crowther
Sent: 15 February 2010 11:47
To: Tomcat Users List
Subject: Re: Performance issues when adding Tomcat JK redirector to IIS's
Default Web Site?

Steve, you're likely to get more specific answers if you can tell us
versions: what version of the redirector, and what versions of IIS?
Also, can you tell us whose instructions you followed to get it
working, as there are some out there that are... how shall I say it...
less than ideal :-).

Cheers,

- Peter

On 15 February 2010 11:30, Steve Ryan st...@acme.ie wrote:
 Dear All



 I've tried googling this but can't find much, so I was hoping one of you
 guys might be able to help me.



 My web application lives under IIS's Default Web Site. It needs to use
the
 Tomcat JK redirector, so I have added the redirector as an ISAPI Filter on
 the Default Web Site. This means any websites which live under the
 Default Web Site will use the redirector.



 This is fine, however, there are other third-party websites which live
under
 IIS's Default Web Site, which means the change I made above (adding the
 redirector as an ISAPI Filter on the Default Web Site) also affects
these
 third party websites.



 So my question is this:



 Are there any known performance issues with the Tomcat JK redirector, in
 particular, any performance issues which could affect the third-party
 websites as explained in my example above?



 Any advice appreciated.



 Cheers



 Steve



-
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: Performance issues when adding Tomcat JK redirector to IIS's Default Web Site?

2010-02-15 Thread Steve Ryan
Apologies, for some reason the formatting of my e-mail get messed up. I have
reformatted below:

Hi Peter

Thanks for your reply.

To answer your questions:

I am using IIS 6 and IIS 7.
I am using the latest version of the redirector, i.e. JK-1.2.28.

Our technical architect decided how we should use the redirector. This is
the basic design:

IIS 
- Default Web Site (ISAPI Filter = isapi_redirect.dll)
--- Virtual directory for our web application
--- Virtual directory for the redirector
--- Virtual directory for other third-party website

IIS Application Pools
- DefaultAppPool (may be used by Other third-party website)
- AppPool for our web application
- AppPool for the redirector

So as you can see, all the virtual directories live under the Default Web
Site. 

The isapi_redirect.dll is added as an ISAPI Filter for the entire Default
Web Site, which means all the virtual directories under Default Web Site
will be affected by this. My worry is it might impact Other third-party
website.

Thanks for your help.

Cheers

Steve

-Original Message-
From: peter.crowth...@googlemail.com [mailto:peter.crowth...@googlemail.com]
On Behalf Of Peter Crowther
Sent: 15 February 2010 11:47
To: Tomcat Users List
Subject: Re: Performance issues when adding Tomcat JK redirector to IIS's
Default Web Site?

Steve, you're likely to get more specific answers if you can tell us
versions: what version of the redirector, and what versions of IIS?
Also, can you tell us whose instructions you followed to get it
working, as there are some out there that are... how shall I say it...
less than ideal :-).

Cheers,

- Peter

On 15 February 2010 11:30, Steve Ryan st...@acme.ie wrote:
 Dear All



 I've tried googling this but can't find much, so I was hoping one of you
 guys might be able to help me.



 My web application lives under IIS's Default Web Site. It needs to use
the
 Tomcat JK redirector, so I have added the redirector as an ISAPI Filter on
 the Default Web Site. This means any websites which live under the
 Default Web Site will use the redirector.



 This is fine, however, there are other third-party websites which live
under
 IIS's Default Web Site, which means the change I made above (adding the
 redirector as an ISAPI Filter on the Default Web Site) also affects
these
 third party websites.



 So my question is this:



 Are there any known performance issues with the Tomcat JK redirector, in
 particular, any performance issues which could affect the third-party
 websites as explained in my example above?



 Any advice appreciated.



 Cheers



 Steve



-
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



Xmx definition

2010-02-15 Thread Amir Hadadi
I'm running apache tomcat version 5.5.23. my OS is CENTOS 5.
I've used Runtime.getRuntime().getMaxMemory() to get an approximation of my
Xmx. The figure I got was 842MB.
Since this is not the default, and I've looked up in all possible scripts
(including searching for the string 'Xmx' in the entire hard drive) and
found no trace of an Xmx definition, I wonder were this number came from.


Re: Tomcat 6 is getting down

2010-02-15 Thread Konstantin Kolinko
2010/2/15 vramanaj vrama...@gmail.com:

 Tomcat is getting down automatically, after few seconds of starting it.
 Attached is the tomcat log. Could n't able to identify the issue. Please
 help me out.

This mailing list does not allow attachments.

Either paste it as text,  or put it elsewhere,
 e.g. use http://pastebin.com/

Also:
1) your exact Tomcat version = ?  x.y.z
2) your operating system
3) step-by-step how you do starting it, etc, your configuration, ..


Best regards,
Konstantin Kolinko

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



RE: Xmx definition

2010-02-15 Thread Caldarale, Charles R
 From: Amir Hadadi [mailto:ami...@correlix.com]
 Subject: Xmx definition
 
 I'm running apache tomcat version 5.5.23. my OS is CENTOS 5.

Not relevant; what is relevant is the JVM version, which you didn't mention.

 I've used Runtime.getRuntime().getMaxMemory() to get an approximation
 of my Xmx. The figure I got was 842MB.

 I wonder were this number came from.

To quote from the Sun JVM 6 initialization code:

  // If the maximum heap size has not been set with -Xmx,
  // then set it as fraction of the size of physical memory,
  // respecting the maximum and minimum sizes of the heap.

 - 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: Xmx definition

2010-02-15 Thread Amir Hadadi
Thanks, That was a great help !

On Mon, Feb 15, 2010 at 4:00 PM, Caldarale, Charles R 
chuck.caldar...@unisys.com wrote:

  From: Amir Hadadi [mailto:ami...@correlix.com]
  Subject: Xmx definition
 
  I'm running apache tomcat version 5.5.23. my OS is CENTOS 5.

 Not relevant; what is relevant is the JVM version, which you didn't
 mention.

  I've used Runtime.getRuntime().getMaxMemory() to get an approximation
  of my Xmx. The figure I got was 842MB.

  I wonder were this number came from.

 To quote from the Sun JVM 6 initialization code:

  // If the maximum heap size has not been set with -Xmx,
  // then set it as fraction of the size of physical memory,
  // respecting the maximum and minimum sizes of the heap.

  - 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: Tomcat dies suddenly

2010-02-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Carl,

On 2/14/2010 4:34 PM, Carl wrote:
 I upgraded to 5.1.11 but can go back to 3.1.12 in about 15 minutes. 
 Have been running all day on 5.1.11... no burps so far but I haven't
 been pushing it.  Tomoroow, I will see if I can break it.

Just don't change too much at once: you'll never know what fixed the
problem :)

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

iEYEARECAAYFAkt5Xw0ACgkQ9CaO5/Lv0PDZ/wCgpQWpFmvPKGjJUKEz7wYK0TVu
YMoAn3LR7bA7QJjqQ5hdnlOkDu1TVK0A
=rdCw
-END PGP SIGNATURE-

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



Re: Tomcat 6 is getting down

2010-02-15 Thread Pid

On 15/02/2010 12:41, vramanaj wrote:


Tomcat is getting down automatically, after few seconds of starting it.
Attached is the tomcat log. Could n't able to identify the issue. Please
help me out.


It is a funky cat. /appallingpun


p


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



RE: Tomcat 6 is getting down

2010-02-15 Thread Caldarale, Charles R
 From: Pid [mailto:p...@pidster.com]
 Subject: Re: Tomcat 6 is getting down
 
 It is a funky cat. /appallingpun

Perhaps they could name the server Marvin:

...and then of course I've got this terrible pain in all the diodes down my 
left hand side...

 - 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



roll based security with tomcat

2010-02-15 Thread sonali_india

hello friends.
i am learning to implement roll (form) based security with tomcat.
i got few examples on google but found difficult to understand.

please help me how to do it?
please forward a simple example if possible. i will be grateful.

thank you.
-- 
View this message in context: 
http://old.nabble.com/roll-based-security-with-tomcat-tp27595912p27595912.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



Is it possible to replace the HttpSession implementation in Tomcat?

2010-02-15 Thread Simone Tripodi
Hi all guys and very nice to meet the Tomcat community,
I've a web-application that needs to be replicated in more than one
Tomcat, and since it is HttpSession based, I need to enable the
session replication.
Even if I work with very good sysadmins that know how to do it, I'm
curious and would like to know if I could replace the HttpSession
implementation with a my own one, I'd like to integrate Hazelcast[1]
for data synchronization.
Thanks in advance, every suggestion will be very appreciated.
Simo

[1] http://www.hazelcast.com/

http://people.apache.org/~simonetripodi/

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



Re: roll based security with tomcat

2010-02-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sonali,

On 2/15/2010 11:01 AM, sonali_india wrote:
 i am learning to implement roll (form) based security with tomcat.

That's role-based security. Roll-based security would be based upon
dice, I guess.

 i got few examples on google but found difficult to understand.
 
 please help me how to do it?
 please forward a simple example if possible. i will be grateful.

See chapter 12 of the servlet specification.

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

iEYEARECAAYFAkt5f3kACgkQ9CaO5/Lv0PAEBgCgnWbKpORTUG2Y8IfCYh9citu5
JcYAn09Spd2pY4r36gxInYMkK1ANpZFN
=UJoP
-END PGP SIGNATURE-

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



Re: Is it possible to replace the HttpSession implementation in Tomcat?

2010-02-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Simone,

On 2/15/2010 12:05 PM, Simone Tripodi wrote:
 I've a web-application that needs to be replicated in more than one
 Tomcat, and since it is HttpSession based, I need to enable the
 session replication.
 Even if I work with very good sysadmins that know how to do it, I'm
 curious and would like to know if I could replace the HttpSession
 implementation with a my own one, I'd like to integrate Hazelcast[1]
 for data synchronization.

Why not use the session replication that comes with Tomcat?

Otherwise, presumably Hazelcast knows how to integrate their own product
with Tomcat. You might have better luck asking them.

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

iEYEARECAAYFAkt5f/AACgkQ9CaO5/Lv0PBs2ACgh/CsaG1mdvnENrcw5Zt8cn10
tPgAni7x4ZGDvBiT2+wIoPZ5QwuOBKNG
=P+WC
-END PGP SIGNATURE-

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



Re: roll based security with tomcat

2010-02-15 Thread sonali_india

thank you Christopher,
and sorry for the spelling mistake.
would you please provide me a link to this chapter 12. please. very sorry to
bother.
thank you once again.


Christopher Schultz-2 wrote:
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Sonali,
 
 On 2/15/2010 11:01 AM, sonali_india wrote:
 i am learning to implement roll (form) based security with tomcat.
 
 That's role-based security. Roll-based security would be based upon
 dice, I guess.
 
 i got few examples on google but found difficult to understand.
 
 please help me how to do it?
 please forward a simple example if possible. i will be grateful.
 
 See chapter 12 of the servlet specification.
 
 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
 iEYEARECAAYFAkt5f3kACgkQ9CaO5/Lv0PAEBgCgnWbKpORTUG2Y8IfCYh9citu5
 JcYAn09Spd2pY4r36gxInYMkK1ANpZFN
 =UJoP
 -END PGP SIGNATURE-
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 

-- 
View this message in context: 
http://old.nabble.com/roll-based-security-with-tomcat-tp27595912p27597250.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



RE: roll based security with tomcat

2010-02-15 Thread Caldarale, Charles R
 -Original Message-
 From: sonali_india [mailto:amit.daund...@gmail.com]
 Subject: Re: roll based security with tomcat
 
 would you please provide me a link to this chapter 12.

http://www.lmgtfy.com/?q=servlet+spec

 - 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: Is it possible to replace the HttpSession implementation in Tomcat?

2010-02-15 Thread Jon Brisbin
I'm just getting ready to ask a question like this, as I have a similar need.

I'm using the built-in Tribes-based replication which works fine for short 
periods of time and under moderate to light load. Once the Tomcat server has 
been running for a day or two, though, this distributed session replication 
starts breaking unexpectedly. Once this happens, the apps start becoming 
unavailable until I restart everything.

I'm trying to figure out today how I can implement a Valve or something that 
can store a session to a backend DB and reload that session on another Tomcat 
instance similar to how the PersistentManager loads user's session after a 
restart.

Would a Valve based on PersistentValve allow me to implement a cluster-like 
solution such that a user login causes a write to a central database and a load 
balanced request to another server would see that user without forcing another 
login?

Jon Brisbin
Portal Webmaster
NPC International, Inc.



On Feb 15, 2010, at 11:05 AM, Simone Tripodi wrote:

 Hi all guys and very nice to meet the Tomcat community,
 I've a web-application that needs to be replicated in more than one
 Tomcat, and since it is HttpSession based, I need to enable the
 session replication.
 Even if I work with very good sysadmins that know how to do it, I'm
 curious and would like to know if I could replace the HttpSession
 implementation with a my own one, I'd like to integrate Hazelcast[1]
 for data synchronization.
 Thanks in advance, every suggestion will be very appreciated.
 Simo
 
 [1] http://www.hazelcast.com/
 
 http://people.apache.org/~simonetripodi/
 
 -
 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: Tomcat not seeing servlet

2010-02-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Konstantin,

On 2/14/2010 8:53 AM, Konstantin Kolinko wrote:
 Try this instead:
 
  form name=login method=post action=AuthLogin
 
 or this
  form name=login method=post action=./AuthLogin

Even better:

form name=login method=post action=%=
response.encodeURL(request.getContextPath()  +/AuthLogin)%

This will encode the URL with the session id if necessary, and pre-pend
any context path necessary.

As pointed our by another poster, the use of a tag library such as
JSTL's c:url takes care of this for you, and always uses
context-relative URLs (just as the above code would do).

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

iEYEARECAAYFAkt5kQ0ACgkQ9CaO5/Lv0PDs5gCfbQvX7JSjX2FdkquQjUYqyApt
EZQAnjgHll4T6kCUX0u3aDafbGUuCSoF
=3lsS
-END PGP SIGNATURE-

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



Re: Is it possible to replace the HttpSession implementation in Tomcat?

2010-02-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jon,

On 2/15/2010 12:55 PM, Jon Brisbin wrote:
 I'm using the built-in Tribes-based replication which works fine for
 short periods of time and under moderate to light load. Once the
 Tomcat server has been running for a day or two, though, this
 distributed session replication starts breaking unexpectedly. Once
 this happens, the apps start becoming unavailable until I restart
 everything.

That's unfortunate. You should post a complaint that you are observing
this behavior. AFAIK, the Tomcat devs are quite satisfied with their
replication implementation. Get ready to defend your use of session
objects, though :)

 I'm trying to figure out today how I can implement a Valve or
 something that can store a session to a backend DB and reload that
 session on another Tomcat instance similar to how the
 PersistentManager loads user's session after a restart.
 
 Would a Valve based on PersistentValve allow me to implement a
 cluster-like solution such that a user login causes a write to a
 central database and a load balanced request to another server would
 see that user without forcing another login?

I would think that simply using the existing PersistenceManager +
JDBCStore would work. In tact, it's even documented to be one of the
ways of achieving session clustering without doing in-memory
replication: http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html

Unfortunately, I didn't see any specifics on how to configure Tomcat to
do just that, though I must admit I didn't spend very much time looking.

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

iEYEARECAAYFAkt5khwACgkQ9CaO5/Lv0PCydwCdE/ZjGWYg91P+anDZIFYhilSz
QVUAniRKuLV/TSUphnlBhEdKIKDGC2TM
=+FuL
-END PGP SIGNATURE-

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



Re: Is it possible to replace the HttpSession implementation in Tomcat?

2010-02-15 Thread Simone Tripodi
Hi Cris,
thanks for your reply and nice to meet you :)
There's no specific reason why I don't want to use the built-in
session replication, even if I'd be able to realize what I've in my
mind, the sysadmins will never let me know to use it since they're
confident with the Tomcat solution.
BTW, I'm just curious and like very much integrating heterogeneous
software layers in an original way, so before spending time in
studying the Tomcat code and understand how to realize my crazy stuff
I wrote the email :P
Thanks, all the best,
Simo

http://people.apache.org/~simonetripodi/



On Mon, Feb 15, 2010 at 6:10 PM, Christopher Schultz
ch...@christopherschultz.net wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Simone,

 On 2/15/2010 12:05 PM, Simone Tripodi wrote:
 I've a web-application that needs to be replicated in more than one
 Tomcat, and since it is HttpSession based, I need to enable the
 session replication.
 Even if I work with very good sysadmins that know how to do it, I'm
 curious and would like to know if I could replace the HttpSession
 implementation with a my own one, I'd like to integrate Hazelcast[1]
 for data synchronization.

 Why not use the session replication that comes with Tomcat?

 Otherwise, presumably Hazelcast knows how to integrate their own product
 with Tomcat. You might have better luck asking them.

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

 iEYEARECAAYFAkt5f/AACgkQ9CaO5/Lv0PBs2ACgh/CsaG1mdvnENrcw5Zt8cn10
 tPgAni7x4ZGDvBiT2+wIoPZ5QwuOBKNG
 =P+WC
 -END PGP SIGNATURE-

 -
 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: Tomcat not seeing servlet

2010-02-15 Thread Ugo Ojeda
2010/2/14 David Short dsh...@san.rr.com

 Thank you Juha.  The c:url value='/AuthLogin'/ works nicely.

 -Original Message-
 From: Juha Laiho [mailto:juha.la...@iki.fi]
 Sent: Sunday, February 14, 2010 8:49 AM
 To: users@tomcat.apache.org
 Subject: Re: Tomcat not seeing servlet

 On 02/14/2010 06:21 PM, David Short wrote:
  ./AuthLogin and AuthLogin still don't work.
 
  It works with the fully qualified path
  http://yourserver:port/yourwebapp/AuthLogin; or ../../AuthLogin

 Ah, yes, that completes the picture. And below I'll
 somewhat repeat what Konstantin already explained, but
 perhaps in a little bit different way.

 The url-patterns you set in web.xml are relative to the
 application (context) root:

  servlet-mapping
  servlet-nameAuthLoginServlet/servlet-name
  url-pattern/AuthLogin/url-pattern
  /servlet-mapping

 .. which means that the full URL for the above servlet will be
 http://server:port/contextroot/AuthLogin

 However, URLs you set in jsp:s are true URLs, which means
 that the /AuthLogin in your jsp form is not relative to
 the application root:

  Login.jsp snippet:
  form name=login method=post action=/AuthLogin

 ... /AuthLogin here refers to
 http://server:port/AuthLogin

 The proposed forms
form name=login method=post action=AuthLogin
form name=login method=post action=./AuthLogin

 would both refer to
 http://server:port/yourwebapp/path_to_Loginjsp/AuthLogin

 ... where, apparently the path_to_Loginjsp in your case
 has two levels of directories. To make either of the above
 forms work, your url-pattern for the AuthLoginServlet would
 have to be
 url-pattern/path_to_Loginjsp/AuthLogin/url-pattern
 ... and this would pretty much be the easiest way to solve
 the problem; with this, your JSP could really have the
 form action as plain AuthLogin.

 The JSTL tag library does also contain a tag c:url, which
 helps in making URLs that refer to the application itself;
 that would be another solution if your application already
 uses JSTL. For an explanation, see f.ex.
 http://www.ibm.com/developerworks/java/library/j-jstl0318/
 --
 ..Juha

 -
 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




-- 
MBA Ing. Ugo Ojeda del Arco
Gerente de Desarrollo de Sistemas
Universidad del Pacifico

Telf. 2190100 - 2228 / 2161

PD Tarda 7 segundos en imprimir este email y 7 años en crecer el árbol que
servirá para hacer el papel.


Re: JSP Page hangs... clues? (SOLVED)

2010-02-15 Thread Jordan Michaels

For the sake of record-keeping, I believe we found the fix for this.

The client got in touch with us today stating that the entire site was 
now unresponsive. We reviewed the log files and miraculously this time 
there WAS an error message (lots of them).


The error was as follows:
---
SEVERE: Error allocating socket processor
java.lang.OutOfMemoryError: unable to create new native thread
---

Googling this led me to the following:
http://java-monitor.com/forum/showthread.php?t=570
and
http://jroller.com/rreyelts/date/20040909

So, looking at my setenv.sh values, it turns out that Xss256m is 
extremely massive. It means each time a new thread was created, 256 
*MEGS* would get allocated to that thread (even if it wasn't used). So 
we would look at top and see that there was plenty of free memory, but 
not realize that it had all been allocated to the threads. I reduced the 
value to 512k, and things are now working beautifully.


I can only guess at why there were no logs when this happened previously 
(maybe no memory left to spawn a new logging thread? no idea...), but 
the page that was hanging now runs very quickly even when I hammer my 
refresh button on it. =D


Thanks to those of you who tried to help with this issue. Hopefully this 
post can help someone in the future!


Warm regards,
Jordan Michaels
Vivio Technologies
http://www.viviotech.net/
Open BlueDragon Steering Committee
Railo Community Distributions


Jordan Michaels wrote:
We have an interesting situation and I'm wondering if anyone has any 
ideas on where we could look for possible solutions.


We have a JSP page that performs a large mysql query of product titles 
(just the names). The list is then spit out on the page with drill-down 
links. Pretty simple really. The problem is that just after a tomcat 
restart, the first and occasionally the second and third requests will 
process all the way just fine, but most subsequent requests will hang 
on a random record. Occasionally one will go all the way through, but 
most will hang.


Let me clarify, we restart tomcat, hit the page, and the page loads 
fine. We hit refresh once or twice, and the page will fail to load 
fully. The page will hang after a random product title and just stop 
responding. You can click on any other page on the site, but this one 
page with the large product listing query hangs in random spots.


We've studied this intently. The server this is running on is a CentOS 
4, 32-bit box with 1.5 GB RAM, Apache 2, and mod_jk.


Our first thought was memory issues. We increased Tomcat's memory using 
 the setenv.sh file, which now contains the following line:


JAVA_OPTS=-Xms128m -Xmx1024m -Xss256m -XX:MaxPermSize=256m ; export 
JAVA_OPTS


We've verified that the settings are in place by using the ps ax 
command and making sure the java process includes the updated settings. 
Unfortunately, this seems to have no effect at all.


We then reviewed the logs: catalina.out, mod_jk.log, and apache's
error_log, among others. We monitored these logs using tail so we
could see if any errors were thrown as we hit the page. No errors were
thrown if the request went through good or it failed. The logs were 
completely quiet.


We've updated Tomcat, mod_jk, the JVM, and the MySQL driver to the 
absolute latest versions available as of this writing.


Does anyone have any clues as to where we might look for what is 
happening to make this one page hang? It still feels like a memory 
issue, but with nothing in the logs and no indicators other then the 
problem itself, we'd appreciate any suggestions on what to look for at 
this point.


Thank you in advance!



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



Re: Performance issues when adding Tomcat JK redirector to IIS's Default Web Site?

2010-02-15 Thread Mladen Turk

On 02/15/2010 12:30 PM, Steve Ryan wrote:


Are there any known performance issues with the Tomcat JK redirector, in
particular, any performance issues which could affect the third-party
websites as explained in my example above?



Since this is filter it will participate in every request.
Now this might sound scary but the actual participation is limited
to matching the url with the uriworkermap.properties list.
Depending on the rules used this might be as simple as a
few strcasecmp operations or few regex matchings, but on any
decent hardware this should be very fast. How fast, well
to get a precise number you will have to measure it, but
it should be fast enough so it won't be measurable without
using high performance timers.

Of course there are few other operations involved with
each request, and the largest performance degradation
will be involved with logging if you use debug level since
this will force writing to the file for each request even
the one not going trough isapi_redirector.
However using debug logging might be worse-case scenario
proof of concept since you will have in the logs the amount
of time spend for each request inside isapi_redirector, so
it will give you the sense of the performance degradation.
Of course this time will include the time for actual logging,
so the production timing would be much less.


Regards
--
^TM

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