check if can connect to redis on startup otherwise shut down plus some minor database fixes