Using several complex variables techniques, we investigate the interplay between the geometry of the boundary and compactness of Hankel operators. Let P be a function smooth up to the boundary on a smooth bounded pseudoconvex domain Omega subset of C-n. We show that, if Omega is convex or the Levi form of the boundary of Q is of rank at least n - 2, then compactness of the Hankel operator H-beta implies that beta is holomorphic "along" analytic discs in the boundary. Furthermore, when Omega is convex in C-2 we show that the condition on is necessary and sufficient for compactness of H-beta. (C) 2009 Elsevier Inc. All rights reserved.