Fighting "broken pipe" connecting to the DB after long server idle time