Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GnuPG: OSError - Cannot allocate memory #263

Open
manikanta-kondeti opened this issue May 30, 2019 · 1 comment
Open

GnuPG: OSError - Cannot allocate memory #263

manikanta-kondeti opened this issue May 30, 2019 · 1 comment

Comments

@manikanta-kondeti
Copy link

manikanta-kondeti commented May 30, 2019

Package details: python-gnupg==0.4.4
System specs: 4GB RAM, 2 core CPU

We're facing a problem with the GnuPG module.

We're using this module to encrypt our reports using a scheduler that triggers the report to generate them periodically.

Most of the times(once in 5 days) we're facing with the following issue: OSError - cannot allocate memory. Please help me out on how to diagnose and fix this problem.

[2019-05-30 02:04:05,042] {/home/project/lib/python3.6/site-packages/gnupg.py:845} ERROR Unable to run gpg (gpg) - it may not be available.
Traceback (most recent call last):
  File "/home/project/lib/python3.6/site-packages/gnupg.py", line 842, in __init__
    p = self._open_subprocess(["--version"])
  File "/home/project/lib/python3.6/site-packages/gnupg.py", line 923, in _open_subprocess
    startupinfo=si)
  File "/usr/lib64/python3.6/subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "/usr/lib64/python3.6/subprocess.py", line 1275, in _execute_child
    restore_signals, start_new_session, preexec_fn)
OSError: [Errno 12] Cannot allocate memory
@fabrizio8
Copy link

Your computer is out of memory. The gnupg module attempts to start another process but fails because the OS won't give it memory. The solution is to add more physical memory or allocate/increase the size of a swap partition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants