gpg: signing/decryption failed: Not enough space

Recently we’ve updated from gpg4win 2.3.1 to gpg4win 4.0.3. This brought along a couple of issues which we have all solved, except for one. It seems that sometimes (maybe 1% of all cases) in the signing or decryption process a gpg fails to sign or decrypt a file with error: not enough space. If we try again, it works. At first we thought this may be a memory or paging problem but this does not seem the case as we’ve increased both. Also we cannot find the error in any documentation or forum anywhere. Can someone maybe shed some light on this error?

Well, 2.3.1 was quite a while ago. I think that the difference might be that for some years we decrypt files to %TEMP% and then move them to the final output location while 2.3.1 may have decrypted the files directly in the same same folder. So if your %TEMP% (wherever you have configured it to be) is full it would run into “not enough space”

You can change the behaviour in Kleopatra → Settings → Configure Kleopatra → Crypto Operations. Check: “Create temporary decrypted files in the folder of the encrypted file”.

Or through Registry:
Value: dont-use-tmp-dir true