[pgpool-general: 5908] Re: Pgpool-3.7.1 out of memory
ishii at sraoss.co.jp
Wed Jan 31 09:48:04 JST 2018
> I've got a single pgpool server load balancing and streaming between 1 RDS
> primary and 1 RDS replica. In general, things work pretty well. But I find
> that each night, at the same time, pgpool network IO spikes, because of
> some jobs we kick off and pgpool fails to gracefully handle the load.
> As the number of connections and queries increases, we see an increase in
> processes receiving SIGKILL. Within a minute, we see all of the processes
> receive SIGKILL. Then we lose the connection to our backends. It seems that
> new children are spawned and the cycle repeats itself. Suddenly, the parent
> process can no longer fork, because pgpool cannot allocate memory. After
> the memory error no children are forked (waited 6 hours, never recovered).
> If I connect to pgpool my connection hangs indefinitely. Once pgpool
> reports the memory error, nstat show TcpExtListenDrops are ever
> Has anyone else run into issues like this? I tried moving to a larger
> instance (from 8gb RAM to 15). The 8pm job deluge was passed, pgpool
> climbed to 11.2gb of RAM. But just now, I ran into the issue again... Any
> insight would be appreciated.
The memory usage of Pgpool-II strongly depends on what queries are
used. The most memory consumption case is, extended query + many rows
extracting. In this case pgpool child uses memory worth whole rows
extracted before sync message is issued by a client.
If that's the case, I recommend to set
child_max_connections = 1
So that each pgpool child process exits and returns memory to the
system each time the session from client to pgpool ends. This will
somewhat hurt performance because connection pooling is virtually
SRA OSS, Inc. Japan
More information about the pgpool-general