checking db connection on main server