960 file descriptors is still a couple orders of magnitude lower than what I’ve typically seen: from my experience the default appears for each process to have space for up to 64k file descriptors. Are you running in some constrained environment where this limit is much slower? What’s the output of ulimit -n that I asked for earlier?
Note that lack of file descriptors can appear at any time, during any operation, in many forms: it’s unrealistic to catch it consistently and provide a uniform error message.