Start here. This is the direct spoken answer to practice first.
Overview
Separates stale checkout protection, connection aging, pool waits, statement timeouts, and uncertain transactions.
pool_pre_ping checks a pooled connection when it is checked out and replaces it if the connection is already dead. pool_recycle retires connections older than a configured age when they are next checked out. These help when a server, proxy, or firewall closes idle connections. They cannot save a transaction whose connection dies in the middle; that transaction is lost and the whole operation must handle the failure.