add an option for pending size limit