Thread: [GENERAL] Out of memory error

[GENERAL] Out of memory error

From
Chris Roberts
Date:

Hello,

 

My deployment is Postgres 9.3.5 on a Windows machine.

 

Would someone tell me why I am seeing the following Postgres logs?

 

07:56:20 EST LOG:  00000: execute <unnamed>: SELECT * FROM "c3p0"

07:56:20 EST LOCATION:  exec_execute_message, src\backend\tcop\postgres.c:1906

07:56:20 EST LOG:  00000: execute <unnamed>: SELECT * FROM "c3p0"

07:56:20 EST LOCATION:  exec_execute_message, src\backend\tcop\postgres.c:1906

07:56:20 EST LOG:  00000: execute <unnamed>: SELECT * FROM "c3p0"

07:56:20 EST LOCATION:  exec_execute_message, src\backend\tcop\postgres.c:1906

07:56:20 EST LOG:  08P00: incomplete message from client

07:56:20 EST LOCATION:  pq_getmessage, src\backend\libpq\pqcomm.c:1143

07:56:20 EST ERROR:  54000: out of memory

07:56:20 EST DETAIL:  Cannot enlarge string buffer containing 0 bytes by 1157627900 more bytes.

07:56:20 EST LOCATION:  enlargeStringInfo, src\backend\lib\stringinfo.c:268

07:56:20 EST LOG:  00000: disconnection: session time: 0:01:59.960 user=xxxxxxx database=xxxxxx host=xxx.xxx.xxx.xxx port=57736

 

What is happening here? Is it of concern? Will tuning the DB memory parameters help avoid this?

 

Thanks,

Chris

Re: [GENERAL] Out of memory error

From
Tom Lane
Date:
Chris Roberts <croberts@rossvideo.com> writes:
> Would someone tell me why I am seeing the following Postgres logs?

> 07:56:20 EST LOG:  08P00: incomplete message from client
> 07:56:20 EST LOCATION:  pq_getmessage, src\backend\libpq\pqcomm.c:1143
> 07:56:20 EST ERROR:  54000: out of memory
> 07:56:20 EST DETAIL:  Cannot enlarge string buffer containing 0 bytes by 1157627900 more bytes.
> 07:56:20 EST LOCATION:  enlargeStringInfo, src\backend\lib\stringinfo.c:268

What that looks like is corrupt data coming in from the connected client;
either the client has actually sent something wrong, or the server has
somehow gotten out of sync as to where the message boundaries are in
the data stream.  One way or the other it's interpreting some bytes as
a message length word when they aren't a valid length.

9.3.5 is kind of old, so rather than trying to chase down exactly where
things are going wrong, I suggest you update to 9.3.latest and see if
the problem is still there.  Also look at whether there are newer versions
of whatever client-side libraries you're using, since there's at least
a 50-50 chance that the bug is on that side not the server.

(I'm a bit suspicious that this might be related to commit 2b3a8b20c,
which went into 9.3.6, but it's probably premature to blame that.)

            regards, tom lane