could you post the -v9 output again please? there would be a log entry if the fix is not possible
>
> The RAM usage just goes up and up, with 50 or more GPG processes
> showing up in htop. It's a shame that virtual memory can't be used; I
> have 10GB of free HDD space on my internal drive.
>
> I also ran ulimit -n 8192.
your former output states
>Total number of contained volumes: 1897
so you need at least 4x1897 + all open file descriptors in the system .. thats much to close to 8192 you set
use ulimit -n 100000 and see if this helps.. raise it until the error disappears, you probably have to be root to do so
after every set with ulimit, check if with ulimit -n if the setting is in effect
>
> Fortunately I don't really _need_ this backup, I have others. I'm only
> restoring it to check that it's correct.
>
> Is there nothing else that can be done? Either use a system with more
> RAM or perform a full backup to start a new chain?
>
try the raise until solved and post the output as requested above and we'll see if the lack of threading in your python is the issue. then we can think of other options.