Thread: Out of memory problem

Out of memory problem

From
Nicola Farina
Date:
Hello

I am using  PostgreSQL 8.3.7, compiled by Visual C++ build 1400 under
win32 on a pc with 2 gb ram.
I need to use a long running plperlu stored procedure which actually
seems to make pg consume lot of memory
till a point in which pg crashes.

I have a log with these messages:

<<
Out of memory!
Callback called exit at C:\Perl\lib/DBD/Oracle.pm line 273.

Callback called exit at C:\Perl\lib/DBD/Oracle.pm line 273.

2009-12-30 10:44:35 CET FATAL:  pre-existing shared memory block is
still in use
2009-12-30 10:44:35 CET HINT:  Check if there are any old server
processes still running, and terminate them.
 >>

I am using default pg settings.
Is it possible, in your opinion, that changing some pg memory parameters
could solve this issue ?
May you point me to the relevant docs ?
Thanks in advance
Bye
Nicola

--
Nicola Farina

Ufficio Progetti

Info Line Srl, Via Colorno 63/a, 43122 Parma
Tel 0521-609811
Fax 0521-606924
e-mail: nicola.farina@info-line.it
sito web: http://www.info-line.it



***  AVVISO di RISERVATEZZA ***

Ai sensi del D.lgs 196/03 si precisa che il contenuto di questo messaggio è rivolto unicamente alle persone cui è
indirizzatoe può contenere informazioni la cui riservatezza è tutelata legalmente. 
Ne sono vietati la riproduzione, la diffusione e l'uso in mancanza di autorizzazione  del destinatario. Se l'avete
ricevutoper errore vogliate eliminare il messaggio in modo permanente e darcene cortesemente notizia rispondendo
all'indirizzo:
segreteria@info-line.it



Re: Out of memory problem

From
Craig Ringer
Date:
On 30/12/2009 6:35 PM, Nicola Farina wrote:
> Hello
>
> I am using PostgreSQL 8.3.7, compiled by Visual C++ build 1400 under
> win32 on a pc with 2 gb ram.
> I need to use a long running plperlu stored procedure which actually
> seems to make pg consume lot of memory
> till a point in which pg crashes.

Can you post the procedure code, or at least a description of what it
does? Without knowing that, it's essentially impossible to answer your
question.

--
Craig Ringer

Re: Out of memory problem

From
Nicola Farina
Date:
The procedure is create_accessors_methods in the dbi_link package
which you can find at:
http://pgfoundry.org/projects/dbi-link/
I've slightly modified the code to adapt it better to Oracle.
Basically it is a procedure which builds a lot of views and tables based
on objects (synonyms in my case)
found in an Oracle schema.

I've tried to increase shared_buffers to 512 (from 32) mb
but the process crashed even before...
I think I'll try decreasing ... just a shot in the dark ...

thanks
bye
Nicola

Craig Ringer wrote:
> On 30/12/2009 6:35 PM, Nicola Farina wrote:
>> Hello
>>
>> I am using PostgreSQL 8.3.7, compiled by Visual C++ build 1400 under
>> win32 on a pc with 2 gb ram.
>> I need to use a long running plperlu stored procedure which actually
>> seems to make pg consume lot of memory
>> till a point in which pg crashes.
>
> Can you post the procedure code, or at least a description of what it
> does? Without knowing that, it's essentially impossible to answer your
> question.
>
> --
> Craig Ringer
>


--
Nicola Farina

Ufficio Progetti

Info Line Srl, Via Colorno 63/a, 43122 Parma
Tel 0521-609811
Fax 0521-606924
e-mail: nicola.farina@info-line.it
sito web: http://www.info-line.it



***  AVVISO di RISERVATEZZA ***

Ai sensi del D.lgs 196/03 si precisa che il contenuto di questo messaggio è rivolto unicamente alle persone cui è
indirizzatoe può contenere informazioni la cui riservatezza è tutelata legalmente. 
Ne sono vietati la riproduzione, la diffusione e l'uso in mancanza di autorizzazione  del destinatario. Se l'avete
ricevutoper errore vogliate eliminare il messaggio in modo permanente e darcene cortesemente notizia rispondendo
all'indirizzo:
segreteria@info-line.it



Re: Out of memory problem

From
Nicola Farina
Date:
It seems that the process goes a little further lowering shared_buffers
but I've reached the minimum (128kB with max_connections = 2)
without reaching the end .....
Are there any chances to break the 128kb limit ?
Or do I need to break this process in two smaller parts (not easy for me
....) ?


Craig Ringer wrote:
> On 30/12/2009 6:35 PM, Nicola Farina wrote:
>> Hello
>>
>> I am using PostgreSQL 8.3.7, compiled by Visual C++ build 1400 under
>> win32 on a pc with 2 gb ram.
>> I need to use a long running plperlu stored procedure which actually
>> seems to make pg consume lot of memory
>> till a point in which pg crashes.
>
> Can you post the procedure code, or at least a description of what it
> does? Without knowing that, it's essentially impossible to answer your
> question.
>
> --
> Craig Ringer
>


--
Nicola Farina

Ufficio Progetti

Info Line Srl, Via Colorno 63/a, 43122 Parma
Tel 0521-609811
Fax 0521-606924
e-mail: nicola.farina@info-line.it
sito web: http://www.info-line.it



***  AVVISO di RISERVATEZZA ***

Ai sensi del D.lgs 196/03 si precisa che il contenuto di questo messaggio è rivolto unicamente alle persone cui è
indirizzatoe può contenere informazioni la cui riservatezza è tutelata legalmente. 
Ne sono vietati la riproduzione, la diffusione e l'uso in mancanza di autorizzazione  del destinatario. Se l'avete
ricevutoper errore vogliate eliminare il messaggio in modo permanente e darcene cortesemente notizia rispondendo
all'indirizzo:
segreteria@info-line.it