Server error while Generating Invoice Pdf

hello

I have version 8 Setup, In that when I am generating invoice pdf i am getting following error msg,

Traceback (most recent call last):
  File "/home/frappe/clinic/frappe-bench/apps/frappe/frappe/app.py", line 61, in application
response = frappe.api.handle()
  File "/home/frappe/clinic/frappe-bench/apps/frappe/frappe/api.py", line 54, in handle
return frappe.handler.handle()
  File "/home/frappe/clinic/frappe-bench/apps/frappe/frappe/handler.py", line 21, in handle
data = execute_cmd(cmd)
  File "/home/frappe/clinic/frappe-bench/apps/frappe/frappe/handler.py", line 52, in execute_cmd
return frappe.call(method, **frappe.form_dict)
  File "/home/frappe/clinic/frappe-bench/apps/frappe/frappe/__init__.py", line 922, in call
return fn(*args, **newargs)
  File "/home/frappe/clinic/frappe-bench/apps/frappe/frappe/utils/print_format.py", line 48, in download_pdf
frappe.local.response.filecontent = get_pdf(html)
  File "/home/frappe/clinic/frappe-bench/apps/frappe/frappe/utils/pdf.py", line 17, in get_pdf
pdfkit.from_string(html, fname, options=options or {})
  File "/home/frappe/clinic/frappe-bench/env/src/pdfkit/pdfkit/api.py", line 66, in from_string
configuration=configuration)
  File "/home/frappe/clinic/frappe-bench/env/src/pdfkit/pdfkit/pdfkit.py", line 38, in init
self.configuration = (Configuration() if configuration is None
  File "/home/frappe/clinic/frappe-bench/env/src/pdfkit/pdfkit/configuration.py", line 18, in init
['which', 'wkhtmltopdf'], stdout=subprocess.PIPE).communicate()[0].strip()
  File "/usr/lib/python2.7/subprocess.py", line 710, in init
errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1223, in _execute_child
self.pid = os.fork()
OSError: [Errno 12] Cannot allocate memory

Can anyone help me to fix this issue.

you may try this