[pgpool-general: 167] Re: Fwd: Pgpool 3.1.1: possible memory leak

Tatsuo Ishii ishii at postgresql.org
Mon Jan 16 21:02:24 JST 2012


> The socket directories are different:
> 
> # Unix domain socket path.  (The Debian package defaults to
> # /var/run/postgresql.)
> socket_dir = '/var/run/'
> 
> # Unix domain socket path for pgpool communication manager.
> # (Debian package defaults to /var/run/postgresql)
> pcp_socket_dir = '/var/run/pgpool/pcp/'
> 
> I tried setting two different ports (127001 and 127002) but the memory leak still remains.

Oh, ok. How many times did you do insertion before you see memory
leak? I tried with 384 insertions in my environment and see no leak.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

> I tried to disable without no success the log_* configuration options too.
> 
> # If true, print all statements to the log.  Like the log_statement option
> # to PostgreSQL, this allows for observing queries without engaging in full
> # debugging.
> log_statement = false
> 
> # If true, incoming connections will be printed to the log.
> log_connections = false
> 
> # If true, hostname will be shown in ps status. Also shown in
> # connection log if log_connections = true.
> # Be warned that this feature will add overhead to look up hostname.
> log_hostname = false
> 
> Thank you,
> D 
> 
> ----- Messaggio originale ----- 
> 
> 
> Da: "Tatsuo Ishii" <ishii at postgresql.org> 
> A: "denis gasparin" <denis.gasparin at edistar.com> 
> Cc: pgpool-general at pgpool.net 
> Inviato: Lunedì, 16 gennaio 2012 12:37:44 
> Oggetto: Re: [pgpool-general: 164] Re: Fwd: Pgpool 3.1.1: possible memory leak 
> 
> I'm not sure if your pgpool.conf is actual one. 
> 
>> # Port number for pgpool 
>> port = 127001 
> 
>> # Port number for pgpool communication manager 
>> pcp_port = 127001 
> 
> pgpool and pcp process use same port number. I don't think pgpool is 
> working normally with this setting... 
> -- 
> Tatsuo Ishii 
> SRA OSS, Inc. Japan 
> English: http://www.sraoss.co.jp/index_en.php 
> Japanese: http://www.sraoss.co.jp 
> 
>> Hi to all. 
>> 
>> Anyone? According to me it's a rather serious problem... 
>> 
>> Thank you in advance 
>> 
>> Denis 
>> 
>> ----- Messaggio originale ----- 
>>> Da: "Denis Gasparin" <denis.gasparin at edistar.com> 
>>> A: pgpool-general at pgpool.net 
>>> Inviato: Venerdì, 13 gennaio 2012 19:14:12 
>>> Oggetto: [pgpool-general: 153] Fwd: Pgpool 3.1.1: possible memory leak 
>>> Sorry... the attachment was missing in previous mail. 
>>> 
>>> Denis 
>>> 
>>> 
>>> 
>>> 
>>> Da: "Denis Gasparin" <denis.gasparin at edistar.com> 
>>> A: pgpool-general at pgpool.net 
>>> Inviato: Venerdì, 13 gennaio 2012 19:11:58 
>>> Oggetto: [pgpool-general: 152] Pgpool 3.1.1: possible memory leak 
>>> 
>>> 
>>> 
>>> 
>>> Hi. 
>>> 
>>> 
>>> We're using pgpool as connection pooler and after upgrading to 3.1.1 
>>> we noticed a memory leak that occurs when executing several queries 
>>> during the same connection. 
>>> 
>>> 
>>> You can take the following bash script as example (call it 
>>> feed_psql.sh). 
>>> (test_table is a table with three integer fields). 
>>> 
>>> 
>>> #!/bin/bash 
>>> i=0 ; 
>>> while [ true ]; 
>>> do 
>>> echo 'insert into test_table values ('${i}', '${i}', '${i}');' 
>>> i=$((i+1)); 
>>> echo 'insert into test_table values ('${i}', '${i}', '${i}');' 
>>> i=$((i+1)); 
>>> sleep 1 
>>> done 
>>> 
>>> 
>>> Execute it so that its standard output is sent to standard input of 
>>> psql: 
>>> 
>>> 
>>> 
>>> # sh feed_psql.sh | psql -U edi -h /var/run -p 127001 testdb 
>>> 
>>> 
>>> As you can see, the script is sending two queries per second to a 
>>> postgres db using the same pgpool connection. 
>>> 
>>> 
>>> Using top we monitored the memory usage of the pgpool child process 
>>> and, as you can see below, after few iterations memory keeps 
>>> growing... 
>>> 
>>> 
>>> 
>>> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 
>>> 20442 root 20 0 12088 1140 904 S 0 0.1 0:00.01 pgpool 
>>> 
>>> 
>>> After few iterations the RES field (The non-swapped physical memory a 
>>> task has used) and the VIRT one grow up: 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 
>>> 20442 root 20 0 13040 2032 908 S 0 0.1 0:00.05 pgpool 
>>> 
>>> 
>>> I attached also the pgpool.conf used. 
>>> Pgpool is connected to a postgresql 8.2 server. 
>>> 
>>> 
>>> 
>>> Could you help us, please? 
>>> 
>>> 
>>> Denis 
>>> 
>>> 
>>> _______________________________________________ 
>>> pgpool-general mailing list 
>>> pgpool-general at pgpool.net 
>>> http://www.pgpool.net/mailman/listinfo/pgpool-general 
>>> 
>>> 
>>> _______________________________________________ 
>>> pgpool-general mailing list 
>>> pgpool-general at pgpool.net 
>>> http://www.pgpool.net/mailman/listinfo/pgpool-general 
>> _______________________________________________ 
>> pgpool-general mailing list 
>> pgpool-general at pgpool.net 
>> http://www.pgpool.net/mailman/listinfo/pgpool-general 
> 


More information about the pgpool-general mailing list