Announcement Announcement Module
Collapse
No announcement yet.
login fails once when DB is restarted Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • login fails once when DB is restarted

    Not sure if this is a database pooling issue or Acegi issue. My web app was left running overnight however the database was shutdown and restarted. When I try to log in for the first time (and sometimes a couple of times), I get the error below. Subsequent logins work fine. Seems like a bad connection was picked up from the pool. Again, not sure if this has to do with the database pool provider not evicting bad connection instances or something to do with Acegi's db dao provider.

    This is a very common scenario as our apps are typically run 24X7 while the DB is shutdown on a weekly basis for maintenance and backup purposes.

    Thanks,
    Sanjiv

    Code:
    Your login attempt was not successful, please try again. Reason : executing PreparedStatementCallback [PreparedStatementCreatorFactory.PreparedStatementCreatorImpl: sql=[SELECT login_name, password, 1 from Users WHERE login_name = ?]: params=[user1]]: Io exception: Connection reset; nested exception is java.sql.SQLException: Io exception: Connection reset; nested exception is org.springframework.dao.DataAccessResourceFailureException: executing PreparedStatementCallback [PreparedStatementCreatorFactory.PreparedStatementCreatorImpl: sql=[SELECT login_name, password, 1 from Users WHERE login_name = ?]: params=[user1]]: Io exception: Connection reset; nested exception is java.sql.SQLException: Io exception: Connection reset

  • #2
    As you suggest, this is probably an issue with stale connections and nothing to do with Acegi. Depending on the implementation, there may be some support for checking a connection is valid before using it (e.g. by specifying a SQL statement which is executed each time the connection is extracted from the pool).

    Comment

    Working...
    X