2016-08-12 13:46 GMT+02:00 John Huss <johnth...@gmail.com>:
> In every database I have used every query requires a transaction. Often
> they will start them automatically if you don't do it explicitly.

Right , but I guess that Tomcat uses JDBC connections and I wonder why
for executing validationQuery sentence, Tomcat doesn't use autocommit
= true setting


> On Fri, Aug 12, 2016 at 4:13 AM Jose María Zaragoza <demablo...@gmail.com>
> wrote:
>
>> 2016-08-11 21:33 GMT+02:00 John Huss <johnth...@gmail.com>:
>> > I have verified that in version 8.0.36 of tomcat jdbc the validation
>> query
>> > functionality does not commit the transaction it starts in order to run
>> the
>> > validation query, which can cause an open transaction for a very long
>> time
>> > (possibly until the database crashes).  This seems to be especially
>> > problematic if you have a large pool where the connections are idle for a
>> > large period of time.
>> >
>> > I also tested against version 9.0.0M9, and in that version the problem is
>> > fixed.  However, nothing about this appears in the release notes for any
>> > version (9.0, 8.5, or 8.0).  If this bug has indeed been fixed it should
>> be
>> > documented in the release notes.  Also, back-porting the fix to the 8.0
>> > branch would be very helpful.
>> >
>> > For the time being I am working around the problem by changing my
>> > validation query from "SELECT 1" to be "SELECT 1; COMMIT" (using
>> > postgresql).  This prevents the issue.
>>
>>
>> I wonder why a validationQuery needs to open a new transaction
>>
>>
>> >
>> > This was reported previously (three years ago) here:
>> >
>> https://mail-archives.apache.org/mod_mbox/tomcat-users/201301.mbox/%3CCAPw873vy%2B9kWMQiFPbnTX6g1FSQ8oTVhDJ3Zagp9UkUZ3d5qjw%40mail.gmail.com%3E
>> >
>> > Thanks,
>> > John
>>
>> ---------------------------------------------------------------------
>> 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

Reply via email to