All of a sudden I have started getting server error 500

Today all of a sudden I have started getting server 500 error.

Below is the output log that is shown when I try to access Login.

Traceback (most recent call last):
  File "apps/frappe/frappe/www/", line 26, in get_context
    boot = frappe.sessions.get()
  File "apps/frappe/frappe/", line 161, in get
    bootinfo = get_bootinfo()
  File "apps/frappe/frappe/", line 69, in get_bootinfo
    bootinfo.notification_settings = get_notification_settings()
  File "apps/frappe/frappe/", line 391, in get_notification_settings
    return frappe.get_cached_doc("Notification Settings", frappe.session.user)
  File "apps/frappe/frappe/", line 1083, in get_cached_doc
    doc = get_doc(*args, **kwargs)
  File "apps/frappe/frappe/", line 1172, in get_doc
    doc = frappe.model.document.get_doc(*args, **kwargs)
  File "apps/frappe/frappe/model/", line 73, in get_doc
    return controller(*args, **kwargs)
  File "apps/frappe/frappe/model/", line 105, in __init__
  File "apps/frappe/frappe/model/", line 147, in load_from_db
  File "apps/frappe/frappe/", line 523, in throw
  File "apps/frappe/frappe/", line 491, in msgprint
  File "apps/frappe/frappe/", line 443, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.DoesNotExistError: Notification Settings Administrator not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "apps/frappe/frappe/website/", line 18, in get_response
    response = renderer_instance.render()
  File "apps/frappe/frappe/website/page_renderers/", line 78, in render
    html = self.get_html()
  File "apps/frappe/frappe/website/", line 510, in cache_html_decorator
    html = func(*args, **kwargs)
  File "apps/frappe/frappe/website/page_renderers/", line 89, in get_html
  File "apps/frappe/frappe/website/page_renderers/", line 157, in update_context
    data = self.run_pymodule_method("get_context")
  File "apps/frappe/frappe/website/page_renderers/", line 219, in run_pymodule_method
    return method(self.context)
  File "apps/frappe/frappe/www/", line 29, in get_context
BrokenPipeError: [Errno 32] Broken pipe

What is this error and how to correct it?


I managed to solve the problem by restarting my VPS.

Finally things are working. But I would like to know as to why such a problem ever occurrences? And want should we do to solve it instead of restarting the whole server?



Do the nginx logs have any clues?