Is this a system with a small amount of RAM available by any chance? You might be running into this issue:
Possible workarounds include adding a swap file, using the letsencrypt
package in Ubuntu (which comes with a precompiled python-cryptography
package, so it doesn’t suffer from this problem, but it’s slightly outdated, though probably “good enough”) or using a different ACME client.