I am getting frequent failures to run gpg -d using gpg-connect-agent to manage keys.
I am using Arch Linux with GnuPG 2.2.3-1. The output in journalctl is
failed to build S-Exp (off=0): Cannot allocate memory failed to read the secret key command 'PKDECRYPT' failed: Cannot allocate memory <gcrypt> Ohhhh jeeee: ... this is a bug (sexp.c:1460:do_vsexp_sscan)
I have found related issues, e.g. here and here, though these apply to previous versions, and appear to have been closed as fixed.
It is possible that about 3-4 instances of gpg are trying to decrypt simultaneously.
Please let me know if i can provide more useful information. Thanks.