Re: Inserts disappear after some time under high load

Поиск
Список
Период
Сортировка
От Paul Thomas
Тема Re: Inserts disappear after some time under high load
Дата
Msg-id 20031016121627.A9995@bacon
обсуждение исходный текст
Ответ на Inserts disappear after some time under high load  (rajiv@altec.org)
Список pgsql-jdbc
On 16/10/2003 10:40 rajiv@altec.org wrote:
> Hello,
> We run a high load site in which teachers create and assign Quizzes that
> students take. On an average we have about 150 to 200 students taking
> tests concurrently not to forget teachers using our reports feature to
> generate reports.
>
> We have explored all other possibilities and are exploring the
> possibility
> that the JDBC driver might be at fault for the problem we are facing. Any
> help/suggestions are welcome.
>
> The problem is with table inserts not visible after some time. We
> confirmed that the inserts went in earlier by logging the primary key
> that
> we got from the DB. After some time the record itself disappears. The
> problem occurs irrespective of whether we do things in a transaction or
> not. So we don't set autocommit false or do any rollback either.

What about the autocommit value in postgresql.conf? Have you changed that
to false (very bad idea with JDBC)?

> We also
> don't get any exceptions for the first insert not going through.
> Moreover,
> we have noticed that this happens ONLY under high load.

Define high load. How many transactions per second?

> Our setup is as
> follows.
> Postgresql 7.3.4
> pg73jdbc3 driver
> Redhat 9.0

Should be ok

> Apache/Tomcat 3.3.1

Ugh! Why are you using something that obsolete (and probably quite buggy).
My advice is upgrade to the latest 4.1.x version. Apart from anything
else, you'll find it many times faster :)

> We don't use any connection pooling.

So what exactly do you do? How do you ensure that you don't exceed
max-connections?

> [snip]
>
> We want to find out whether the semantics of the transaction are affected
> by high load and whether the DB driver can be a possible reason for this
> kind of behaviour..

My guess is that something in your application is not thread-safe. Make
sure that connections can't be used by more that one request at a time
(hint: use Tomcat's connecftion pooling).
--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants         |
http://www.thomas-micro-systems-ltd.co.uk   |
+------------------------------+---------------------------------------------+

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

Предыдущее
От: Dave Tenny
Дата:
Сообщение: Re: Inserts disappear after some time under high load
Следующее
От: aehansen@paycheckadv.com
Дата:
Сообщение: ...