Memory Leak / Prepared Statement

Поиск
Список
Период
Сортировка
От John Cook
Тема Memory Leak / Prepared Statement
Дата
Msg-id 3B69AC2A.34F1C10D@interport.net
обсуждение исходный текст
Список pgsql-jdbc
Hi,

I noticed several postings a month ago regarding a memory leak brought
about by the use of Thread.Local in jdbc2/PreparedStatement.java.  I
have what seems like a similar problem, but I am not sure.  I have
applied the patch, but I still have my problem (mine is not really
associated with DateFormat usage.)

I am running Enhydra Application Server 3.1 on top of Postgres and I
have been running an application that tries to match text strings to
items in my database.  It has been running fine for months until
I recently made a modification that uses a lot of "LIKE" statements
(i.e. anywhere from 2-200 at a time.)  Performance is fine, but memory
starts getting eaten up and I eventually hits an OutOfMemoryError.  The
bigger the prepared statement (i.e. the more LIKEs) the more memory is
eaten and the faster I run out of memory.  Oddly enough, before I added
the LIKE statements, I was running fine and, although I used a lot of
prepared statements (the app server did), memory was not being eaten
like this.

Has anyone had a similar experience and is it related to the
Thread.Local problem?  Does anyone know if this is addressed in the
1.4.0 beta JDK or is it scheduled to be addressed in an upcoming
Postgresql release?

Any help would be greatly appreciated.

Thanks in advance.

John Cook




В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Anders Bengtsson
Дата:
Сообщение: Re: Re: What needs to be done?
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: Re: What needs to be done?