You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Baldur Norddahl <bb...@inaphone.com> on 2005/01/04 10:35:10 UTC
postgresql: idle in transaction
Hi,
I am trying to avoid that all my connections ends up in state "idle in
transaction" like this:
bbn@vacuum2:~$ ps ax | grep "postres: secure"
11249 ? S 0:00 postgres: secure db 192.168.2.121 idle in
transaction
With the old version af iBatis and our php projects, that status is only
"idle" (unless the connection is currently working on a query).
Clinton Begin advised me to try <transactionManager type="JDBC"
commitRequired="true"> in the config file. I am going to use this
setting anyway so my stored procedures work correctly, but it does not
seem to have any effect on the "idle in transaction" problem.
It does not seem to have any bad effects on the system, but from a
system admin perspective I would like to avoid it, so I can have my
scripts warn me if those starts piling up. They are a sign that somebody
is not handling their transactions correctly.
Baldur
Re: postgresql: idle in transaction
Posted by Clinton Begin <cl...@gmail.com>.
I don't know then. iBATIS doesn't do anything special in this regard.
Perhaps PGSQL reports idle in transaction for all non-autocommit
connections?
Cheers,
Clinton
On Wed, 05 Jan 2005 09:23:03 +0100, Baldur Norddahl
<bb...@inaphone.com> wrote:
> Clinton Begin wrote:
> Try this... <transactionManager ... commitRequired="true"> By default
> iBATIS only commits on non-queries (insert/update/delete/proc).
> I am already using commitRequired="true", which fixed my stored procedures.
> But it does not fix the "idle in transaction" thing. I do not understand why
> :-(.
>
> It appears as if iBatis starts a new transaction in advantage.
>
> Baldur
>
>
> Cheers, Clinton On Tue, 04 Jan 2005 10:35:10 +0100, Baldur Norddahl
> <bb...@inaphone.com> wrote:
> Hi, I am trying to avoid that all my connections ends up in state "idle in
> transaction" like this: bbn@vacuum2:~$ ps ax | grep "postres: secure" 11249
> ? S 0:00 postgres: secure db 192.168.2.121 idle in transaction With the old
> version af iBatis and our php projects, that status is only "idle" (unless
> the connection is currently working on a query). Clinton Begin advised me to
> try <transactionManager type="JDBC" commitRequired="true"> in the config
> file. I am going to use this setting anyway so my stored procedures work
> correctly, but it does not seem to have any effect on the "idle in
> transaction" problem. It does not seem to have any bad effects on the
> system, but from a system admin perspective I would like to avoid it, so I
> can have my scripts warn me if those starts piling up. They are a sign that
> somebody is not handling their transactions correctly. Baldur
>
Re: postgresql: idle in transaction
Posted by Baldur Norddahl <bb...@inaphone.com>.
Clinton Begin wrote:
>Try this...
>
><transactionManager ... commitRequired="true">
>
>By default iBATIS only commits on non-queries (insert/update/delete/proc).
>
>
I am already using commitRequired="true", which fixed my stored
procedures. But it does not fix the "idle in transaction" thing. I do
not understand why :-(.
It appears as if iBatis starts a new transaction in advantage.
Baldur
>Cheers,
>Clinton
>
>
>On Tue, 04 Jan 2005 10:35:10 +0100, Baldur Norddahl
><bb...@inaphone.com> wrote:
>
>
>>Hi,
>>
>>I am trying to avoid that all my connections ends up in state "idle in
>>transaction" like this:
>>
>>bbn@vacuum2:~$ ps ax | grep "postres: secure"
>>11249 ? S 0:00 postgres: secure db 192.168.2.121 idle in
>>transaction
>>
>>With the old version af iBatis and our php projects, that status is only
>>"idle" (unless the connection is currently working on a query).
>>
>>Clinton Begin advised me to try <transactionManager type="JDBC"
>>commitRequired="true"> in the config file. I am going to use this
>>setting anyway so my stored procedures work correctly, but it does not
>>seem to have any effect on the "idle in transaction" problem.
>>
>>It does not seem to have any bad effects on the system, but from a
>>system admin perspective I would like to avoid it, so I can have my
>>scripts warn me if those starts piling up. They are a sign that somebody
>>is not handling their transactions correctly.
>>
>>Baldur
>>
>>
>>
>
>
>
Re: postgresql: idle in transaction
Posted by Clinton Begin <cl...@gmail.com>.
Try this...
<transactionManager ... commitRequired="true">
By default iBATIS only commits on non-queries (insert/update/delete/proc).
Cheers,
Clinton
On Tue, 04 Jan 2005 10:35:10 +0100, Baldur Norddahl
<bb...@inaphone.com> wrote:
> Hi,
>
> I am trying to avoid that all my connections ends up in state "idle in
> transaction" like this:
>
> bbn@vacuum2:~$ ps ax | grep "postres: secure"
> 11249 ? S 0:00 postgres: secure db 192.168.2.121 idle in
> transaction
>
> With the old version af iBatis and our php projects, that status is only
> "idle" (unless the connection is currently working on a query).
>
> Clinton Begin advised me to try <transactionManager type="JDBC"
> commitRequired="true"> in the config file. I am going to use this
> setting anyway so my stored procedures work correctly, but it does not
> seem to have any effect on the "idle in transaction" problem.
>
> It does not seem to have any bad effects on the system, but from a
> system admin perspective I would like to avoid it, so I can have my
> scripts warn me if those starts piling up. They are a sign that somebody
> is not handling their transactions correctly.
>
> Baldur
>