add db.ping before each sql db cur call to re-awaken connection if needed