We consider a variational problem with boundary singularity and Dirichlet condition. We give a blow-up analysis for sequences of solutions of an equation with exponential nonlinearity. Also, we derive a compactness criterion under some conditions.