The Mojo::mysql module will hold active connections for you in a fork safe manner. Alternatively DBIx::Connector is a database-agnostic way to wrap DBI for this. In either case, you can store the Mojo::mysql/DBIx::Connector object globally and retrieve a handle from it in each discrete action, and it will only reconnect if necessary.