Fix connections of redis and mongodb