[pgpool-general: 3402] Re: v3.4.0.(3)? - memory issue and connection hangs

Pablo Sanchez pablo at blueoakdb.com
Mon Jan 5 04:30:25 JST 2015

[ Comments below, in-line ]

On 01/02/2015 07:56 PM, Tatsuo Ishii wrote:
>> ::: Memory Leak :::
>> >
>> >The front-end application is using the Quartz scheduler[2] whch
>> >seems to occasionally get into an infinite loop.  The memory leak
>> >is triggered when we see upwards of 300+ UPDATE's per second which
>> >fail[3].
>> >
>> >While I understand there's an application issue which needs to be
>> >resolved, IMO PGPool shouldn't die because of the issue.  :)
>> >
>> >I'm enclosing trimmed/sar/ memory data[4] which shows how quickly
>> >we run out of memory.
> I thought we fixed memory leak issue in this commit (which is
> included in the RPM you installed).
> [ trimmed ]
> There may be another code path which trigger another pattern of
> memory leak. Let me invest this...

Hi Tatsuo,

I have a test case for the above problem.

Assuming we have a UTF8 database named /pgbench/, create the following

    create table test (name varchar(80));

Run the attached shell script which inserts data from the attached
.sql file.

Thank you again.  I appreciate it!


I'm attaching a .sql and a shell script.  Please edit the shell
script's /psql/ call to reflect your environment.

When the shell script is running, monitor /pgpool.log/ for the
following errors:

    2015-01-04 14:10:26 - psql (pid 18904): postgrespgbench: LOG: 
pool_send_and_wait: Error or notice message from backend: : DB node id: 
0 backend pid: 19606 statement: "insert into test values 
('d�wi�czno�ci�');" message: "invalid byte sequence for encoding "UTF8": 

If you don't see the above errors, the /psql/ call in the shell script
may not be executing properly.

File Information
o bad-encoding.sql

   A simple INSERT with an intentionally incorrect character set.

o bad-encoding

   A simple shell script which calls 'psql' using '-h' to apply the
   above .sql file.

   The /psql/ output is set to /dev/null

   The shell script displays a '.' for every 100 SQL calls.

Thank you again!
Pablo Sanchez - Blueoak Database Engineering, Inc
Ph:    819.459.1926         Blog:  http://pablo-blog.blueoakdb.com
iNum:  883.5100.0990.1054

-------------- next part --------------

# Spit a . every 100 calls

echo ". = 100 calls"
while [ 1 ] ; do

   psql -h -f bad-encoding.sql pgbench postgres > /dev/null 2>&1

   i=$((i + 1))

   BY_TEN=`expr $i % 100`
   if [ $BY_TEN -eq 0 ] ; then
      echo -n "."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bad-encoding.sql
Type: text/x-sql
Size: 43 bytes
Desc: not available
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20150104/dbd1b39b/attachment.bin>

More information about the pgpool-general mailing list