handling of memory limit error