[pgpool-hackers: 4156] Should we downgrade logging level "ERROR: unable to read data ... child connection forced to terminate due to client_idle_limit:%d is reached"?
Bo Peng
pengbo at sraoss.co.jp
Mon May 9 12:19:44 JST 2022
If we set "client_idle_limit" to a non-zero value, the connection
will be disconnected if it remains idle since the last query.
The disconnection is caused by Pgpool-II settings,
but Pgpool-II handles the log message as an "ERROR".
-------------
psql pid 2419: ERROR: unable to read data
psql pid 2419: DETAIL: child connection forced to terminate due to client_idle_limit:30 is reached
-------------
Although it is harmless, it can sometimes confuse users.
Should we downgrade the logging level?
In the source code, FRONTEND_ERROR is used.
FRONTEND_ERROR sets the logging level to ERROR and disconnect
the cached connections between Pgpool-II and PostgreSQL.
If we downgrade the message, I think we need to define a new macro.
Any comments?
---------------
if (idle_count > pool_config->client_idle_limit)
{
ereport(FRONTEND_ERROR,
(pool_error_code("57000"),
errmsg("unable to read data"),
errdetail("child connection forced to terminate due to client_idle_limit:%d is reached",
pool_config->client_idle_limit)));
}
/*
* Check some cases in which we want to promote an error into a more
* severe error. None of this logic applies for non-error messages.
*/
if (elevel == FRONTEND_ERROR)
{
frontend_invalid = true;
elevel = ERROR;
}
---------------
--
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS, Inc. Japan
http://www.sraoss.co.jp/
More information about the pgpool-hackers
mailing list