You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Kintzel Levente <ki...@codespring.ro> on 2006/04/03 10:06:49 UTC

Turbine security and Postgres

Hi!

 

I'm using Turbine 2.2b3, Torque 3.0.2 and Postgres 7.4.8.

My application's security part is based on Turbine Security.

>From time to time (1-2 hours, not fixed interval) appears a connection to
the Postgres database server that will not be closed. And after 100 such
connections my database server crashes and says "Too many clients". I must
restart Postgres and the Tomcat and the situation begins again. But this is
not a solution.

It seems that Turbine tries to save the current user when the session (a
session) expires.

In the user table of the Turbine Security there is an objectadata column,
that has "oid" type by default. When me or the system tries to save a user
the application throws NumberFormat exception. So the connection are opened
in this moment, when the Exception was thrown. At the beginning I thought
that the connection wasn't closed because of the Exception and from this
reason the connection remains idle.

I read some forums and I realized that the oid type is not correct, and I
changed it to "bytea". By this operation I can save users without catch any
exception, but the connection still appears. Why? What is Turbine doing from
time to time (in the stack trace of the exception I saw something that told
me that the session expires and Turbine tries to save the user). But I
cannot realize what session because the connections were opened in the
middle of the night, and I don't think that somebody was visiting the site,
and the connections appears after 1-2 hours regularly. So I think it is not
in connection with the number of visitors of the webpage.

If somebody knows what's happening, please post me.

 

Thank you!

 

Regards,

       Levi