Joseph:

I've bumped up application logging in a couple of places as early in the login process as I can, but nothing's shown up. The delay occurs between the submit on the login page but before any more of the application's code gets run.

I'm looking into enabling logging on my Oracle JDBC driver, but it's looking certainly non-trivial....

Does Tomcat try to maintain a persistent connection to the database for authenticating logins? My best theory is that after some period of time the firewall that exists between our app server and our database server is silently killing off "idle" connections. So after a connection is killed and someone tries to log in, Tomcat first tries the existing connection (which the firewall tore down) but times out after 20 seconds and creates a new connection. Plausible?

I cannot reproduce the delay on a machine that's on the same subnet as the database (no firewall) using the exact same deployed webapp (war file).

David

On 2012-08-30 22:51, Joseph wrote:
probably a log level FINE or DEBUG might help if the app had any,and you
might be able to turn on debug level log with your JDBC driver,so that you
could capture SQLs.after all this ,you got lots of info with
timestamps,those might help you find the problem.

it might have a SQL performance problem,a memory usage efficiency problem
or a virtual machine performance problem....
hope it helps a little
On Fri, Aug 31, 2012 at 2:01 PM, David A. Rush <da...@rushtone.com> wrote:

We've got two different machines (both Windows Server something) running
Tomcat 7.0.22, and each running a webapp that uses user authentication.
  We're using a couple of different schemes (LDAP and database using
JDBCRealm with hashed pwords, just database with hashed pwords).

When no one has logged in for a while (90 minutes seems to do the trick),
the next login takes almost exactly 40 seconds on one host and almost
exactly 20 seconds on the other one.

Hitting a page in one of the webapps that hits the database for
application data, without requiring login, works fast even if it's been
idle for hours.  But then try to login and I get a 40 second delay after
whacking the "Log in" button on the login form.  Looking at it in more
detail, the host and app with a 40-second delay has two JDBCRealms
configured, both inside of a combined realm.

Are we seeing a 20-second delay in getting authentication via JDBCRealm?

Suggestions on troubleshooting this?

David



------------------------------**------------------------------**---------
To unsubscribe, e-mail: 
users-unsubscribe@tomcat.**apache.org<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

Reply via email to