#239 fix dbremove crash when NOFILE limit is exceeded