[pgpool-hackers: 3993] Re: Fix pgpoolLogger uses 100% cpu when log rotation is enabled

Tatsuo Ishii ishii at sraoss.co.jp
Thu Aug 12 14:47:57 JST 2021


> Hi,
> 
> I found that when log rotation is enabled, the subprocess pgpoolLogger uses
> 100% cpu, and pgpool -m fast stop can work properly.
> 
> Following is an example conf:
> 
> log_truncate_on_rotation = on
> 
> log_rotation_age = 1d
> 
> log_rotation_size = 100MB
> 
>  
> 
> The reason is that the `timeout` pssed to select is not initialized
> completely.
> 
> Text picked from man select(2):
> 
>   Consider timeout to be undefined after select() returns.
> 
>  
> 
> Git patch is attached.

Thank you for the patch. However I am confused why the patch resolves
the cpu usage issue. Moreover, the 100% cpu consuming does not happen
on my environment. Can you please elaborate why current code consumes 100% cpu?
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list