We investigate the asymptotic properties of formal integral series in the neighbourhood of an elliptic equilibrium in nonlinear 2 DOF Hamiltonian systems. In particular, we study the dependence of the optimal order of truncation N opt on the distance ρ from the elliptic equilibrium, by numerical and analytical means. The function N opt (ρ) determines the region of Nekhoroshev stability of the orbits and the time of practical stability. We find that the function N opt (ρ) decreases by abrupt steps. The decrease is roughly approximated with an average power law N opt = O(ρ −a), with a 1. We find an analytical explanation of this behaviour by investigating the accumulation of small divisors in both the normal form algorithm via Lie series and in the direct construction of first integrals. Precisely, we find that the series exhibit an apparent radius of convergence that tends to zero by abrupt steps as the order of the series tends to infinity. Our results agree with those obtained by Servizi G et al (1983 Phys. Lett. A 95 11) for a conservative map of the plane. Moreover, our analytical considerations allow us to explain the results of our previous paper (Contopoulos G et al 2003 J. Phys. A: Math. Gen. 36 8639), including in particular the different behaviour observed for low-order and higher order resonances.