pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedERROR: out of shared memory
7+ messages / 4 participants
[nested] [flat]
* ERROR: out of shared memory
@ 2007-03-26 12:32 Sorin N. Ciolofan <ciolofan@ics.forth.gr>
2007-03-27 03:37 ` Re: [GENERAL] ERROR: out of shared memory Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 7+ messages in thread
From: Sorin N. Ciolofan @ 2007-03-26 12:32 UTC (permalink / raw)
To: pgsql-general@postgresql.org; +Cc: pgsql-admin@postgresql.org; pgsql-performance
Hello!
I have to manage an application written in java which call another module
written in java which uses Postgre DBMS in a Linux environment. I'm new to
Postgres. The problem is that for large amounts of data the application
throws an:
org.postgresql.util.PSQLException: ERROR: out of shared memory
Please, have you any idea why this error appears and what can I do in order
to fix this?
Are there some Postgre related parameters I should tune (if yes what
parameters) or is something related to the Linux OS?
Thank you very much
With best regards,
Sorin
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [GENERAL] ERROR: out of shared memory
2007-03-26 12:32 ERROR: out of shared memory Sorin N. Ciolofan <ciolofan@ics.forth.gr>
@ 2007-03-27 03:37 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-03-27 13:06 ` Re: [GENERAL] ERROR: out of shared memory Merlin Moncure <mmoncure@gmail.com>
2007-03-27 13:13 ` Re: [GENERAL] ERROR: out of shared memory Sorin N. Ciolofan <ciolofan@ics.forth.gr>
0 siblings, 2 replies; 7+ messages in thread
From: Tom Lane @ 2007-03-27 03:37 UTC (permalink / raw)
To: Sorin N. Ciolofan <ciolofan@ics.forth.gr>; +Cc: pgsql-general@postgresql.org; pgsql-admin@postgresql.org; pgsql-performance
"Sorin N. Ciolofan" <ciolofan@ics.forth.gr> writes:
> I have to manage an application written in java which call another module
> written in java which uses Postgre DBMS in a Linux environment. I'm new to
> Postgres. The problem is that for large amounts of data the application
> throws an:
> org.postgresql.util.PSQLException: ERROR: out of shared memory
AFAIK the only very likely way to cause that is to touch enough
different tables in one transaction that you run out of lock entries.
While you could postpone the problem by increasing the
max_locks_per_transaction setting, I suspect there may be some basic
application misdesign involved here. How many tables have you got?
regards, tom lane
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [GENERAL] ERROR: out of shared memory
2007-03-26 12:32 ERROR: out of shared memory Sorin N. Ciolofan <ciolofan@ics.forth.gr>
2007-03-27 03:37 ` Re: [GENERAL] ERROR: out of shared memory Tom Lane <tgl@sss.pgh.pa.us>
@ 2007-03-27 13:06 ` Merlin Moncure <mmoncure@gmail.com>
1 sibling, 0 replies; 7+ messages in thread
From: Merlin Moncure @ 2007-03-27 13:06 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Sorin N. Ciolofan <ciolofan@ics.forth.gr>; pgsql-general@postgresql.org; pgsql-admin@postgresql.org; pgsql-performance
On 3/26/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Sorin N. Ciolofan" <ciolofan@ics.forth.gr> writes:
> > I have to manage an application written in java which call another module
> > written in java which uses Postgre DBMS in a Linux environment. I'm new to
> > Postgres. The problem is that for large amounts of data the application
> > throws an:
> > org.postgresql.util.PSQLException: ERROR: out of shared memory
>
> AFAIK the only very likely way to cause that is to touch enough
> different tables in one transaction that you run out of lock entries.
> While you could postpone the problem by increasing the
> max_locks_per_transaction setting, I suspect there may be some basic
> application misdesign involved here. How many tables have you got?
or advisory locks...these are easy to spot. query pg_locks and look
for entries of locktype 'advisory'. I've already seen some apps in
the wild that use them, openads is one.
merlin
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [GENERAL] ERROR: out of shared memory
2007-03-26 12:32 ERROR: out of shared memory Sorin N. Ciolofan <ciolofan@ics.forth.gr>
2007-03-27 03:37 ` Re: [GENERAL] ERROR: out of shared memory Tom Lane <tgl@sss.pgh.pa.us>
@ 2007-03-27 13:13 ` Sorin N. Ciolofan <ciolofan@ics.forth.gr>
2007-03-27 13:59 ` Re: [GENERAL] ERROR: out of shared memory Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 7+ messages in thread
From: Sorin N. Ciolofan @ 2007-03-27 13:13 UTC (permalink / raw)
To: 'Tom Lane' <tgl@sss.pgh.pa.us>; +Cc: pgsql-general@postgresql.org; pgsql-admin@postgresql.org; pgsql-performance
Dear Mr. Tom Lane,
Thank you very much for your answer.
It seems that the legacy application creates tables dynamically and the
number of the created tables depends on the size of the input of the
application. For the specific input which generated that error I've
estimated a number of created tables of about 4000.
Could be this the problem?
With best regards,
Sorin
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Tuesday, March 27, 2007 6:37 AM
To: Sorin N. Ciolofan
Cc: pgsql-general@postgresql.org; pgsql-admin@postgresql.org;
pgsql-performance@postgresql.org
Subject: Re: [GENERAL] ERROR: out of shared memory
"Sorin N. Ciolofan" <ciolofan@ics.forth.gr> writes:
> I have to manage an application written in java which call another
module
> written in java which uses Postgre DBMS in a Linux environment. I'm new to
> Postgres. The problem is that for large amounts of data the application
> throws an:
> org.postgresql.util.PSQLException: ERROR: out of shared memory
AFAIK the only very likely way to cause that is to touch enough
different tables in one transaction that you run out of lock entries.
While you could postpone the problem by increasing the
max_locks_per_transaction setting, I suspect there may be some basic
application misdesign involved here. How many tables have you got?
regards, tom lane
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [GENERAL] ERROR: out of shared memory
2007-03-26 12:32 ERROR: out of shared memory Sorin N. Ciolofan <ciolofan@ics.forth.gr>
2007-03-27 03:37 ` Re: [GENERAL] ERROR: out of shared memory Tom Lane <tgl@sss.pgh.pa.us>
2007-03-27 13:13 ` Re: [GENERAL] ERROR: out of shared memory Sorin N. Ciolofan <ciolofan@ics.forth.gr>
@ 2007-03-27 13:59 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-03-30 13:20 ` Re: ERROR: out of shared memory Sorin N. Ciolofan <ciolofan@ics.forth.gr>
0 siblings, 1 reply; 7+ messages in thread
From: Tom Lane @ 2007-03-27 13:59 UTC (permalink / raw)
To: Sorin N. Ciolofan <ciolofan@ics.forth.gr>; +Cc: pgsql-general@postgresql.org; pgsql-admin@postgresql.org; pgsql-performance
"Sorin N. Ciolofan" <ciolofan@ics.forth.gr> writes:
> It seems that the legacy application creates tables dynamically and the
> number of the created tables depends on the size of the input of the
> application. For the specific input which generated that error I've
> estimated a number of created tables of about 4000.
> Could be this the problem?
If you have transactions that touch many of them within one transaction,
then yup, you could be out of locktable space. Try increasing
max_locks_per_transaction.
regards, tom lane
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: ERROR: out of shared memory
2007-03-26 12:32 ERROR: out of shared memory Sorin N. Ciolofan <ciolofan@ics.forth.gr>
2007-03-27 03:37 ` Re: [GENERAL] ERROR: out of shared memory Tom Lane <tgl@sss.pgh.pa.us>
2007-03-27 13:13 ` Re: [GENERAL] ERROR: out of shared memory Sorin N. Ciolofan <ciolofan@ics.forth.gr>
2007-03-27 13:59 ` Re: [GENERAL] ERROR: out of shared memory Tom Lane <tgl@sss.pgh.pa.us>
@ 2007-03-30 13:20 ` Sorin N. Ciolofan <ciolofan@ics.forth.gr>
2007-04-06 00:25 ` Re: ERROR: out of shared memory Joseph S <jks@selectacast.net>
0 siblings, 1 reply; 7+ messages in thread
From: Sorin N. Ciolofan @ 2007-03-30 13:20 UTC (permalink / raw)
To: 'Tom Lane' <tgl@sss.pgh.pa.us>; +Cc: pgsql-general@postgresql.org; pgsql-admin@postgresql.org; pgsql-performance
Dear Mr. Tom Lane,
From what I've read from the postgresql.conf file I've understood that
which each unit increasing of the "max_locks_per_transaction" parameter the
shared memory used is also increased.
But the shared memory looks to be already fully consumed according to the
error message, or is the error message irrelevant and improper in this
situation?
With best regards,
Sorin
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Tuesday, March 27, 2007 4:59 PM
To: Sorin N. Ciolofan
Cc: pgsql-general@postgresql.org; pgsql-admin@postgresql.org;
pgsql-performance@postgresql.org
Subject: Re: [GENERAL] ERROR: out of shared memory
"Sorin N. Ciolofan" <ciolofan@ics.forth.gr> writes:
> It seems that the legacy application creates tables dynamically and the
> number of the created tables depends on the size of the input of the
> application. For the specific input which generated that error I've
> estimated a number of created tables of about 4000.
> Could be this the problem?
If you have transactions that touch many of them within one transaction,
then yup, you could be out of locktable space. Try increasing
max_locks_per_transaction.
regards, tom lane
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: ERROR: out of shared memory
2007-03-26 12:32 ERROR: out of shared memory Sorin N. Ciolofan <ciolofan@ics.forth.gr>
2007-03-27 03:37 ` Re: [GENERAL] ERROR: out of shared memory Tom Lane <tgl@sss.pgh.pa.us>
2007-03-27 13:13 ` Re: [GENERAL] ERROR: out of shared memory Sorin N. Ciolofan <ciolofan@ics.forth.gr>
2007-03-27 13:59 ` Re: [GENERAL] ERROR: out of shared memory Tom Lane <tgl@sss.pgh.pa.us>
2007-03-30 13:20 ` Re: ERROR: out of shared memory Sorin N. Ciolofan <ciolofan@ics.forth.gr>
@ 2007-04-06 00:25 ` Joseph S <jks@selectacast.net>
0 siblings, 0 replies; 7+ messages in thread
From: Joseph S @ 2007-04-06 00:25 UTC (permalink / raw)
To: Sorin N. Ciolofan <ciolofan@ics.forth.gr>
Try doing select * from pg_locks to see how many locks you have out.
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2007-04-06 00:25 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-03-26 12:32 ERROR: out of shared memory Sorin N. Ciolofan <ciolofan@ics.forth.gr>
2007-03-27 03:37 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-03-27 13:06 ` Merlin Moncure <mmoncure@gmail.com>
2007-03-27 13:13 ` Sorin N. Ciolofan <ciolofan@ics.forth.gr>
2007-03-27 13:59 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-03-30 13:20 ` Sorin N. Ciolofan <ciolofan@ics.forth.gr>
2007-04-06 00:25 ` Joseph S <jks@selectacast.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox