After server restart, I am getting internal server error.
Checked web.error.log in /home/frappe/frappe-bench/logs/
its shows the following error.
OperationalError: (2003, "Can't connect to MySQL server on u'localhost'
Traceback (most recent call last):
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/gunicor$
self.handle_request(listener, req, client, addr)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/gunicor$
respiter = self.wsgi(environ, resp.start_response)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/werkzeu$
return ClosingIterator(app(environ, start_response), self.cleanup)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/werkzeu$
resp = f(*args[:-2] + (request,))
File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 88, in appli$
response = handle_exception(e)
File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 191, in hand$
http_status_code=http_status_code)
File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 2$
path = resolve_path(path.strip('/ '))
File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 2$
path = resolve_from_map(path)
File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 2$
for r in get_website_rules()])
File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 2$
return frappe.cache().get_value('website_route_rules', _get)
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py", l$
val = generator()
File "/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py", line 2$
rules = frappe.get_hooks("website_route_rules")
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 832, in$
hooks = _dict(cache().get_value("app_hooks", load_app_hooks))
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py", l$
val = generator()
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 810, in$
for app in [app_name] if app_name else get_installed_apps(sort=True):
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 774, in$
installed = json.loads(db.get_global("installed_apps") or "[]")
File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 723, in$
return self.get_default(key, user)
File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 735, in$
d = self.get_defaults(key, parent)
File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 741, in$
defaults = frappe.defaults.get_defaults(parent)
File "/home/frappe/frappe-bench/apps/frappe/frappe/defaults.py", line 57, in $
globald = get_defaults_for()
File "/home/frappe/frappe-bench/apps/frappe/frappe/defaults.py", line 177, in$
where parent = %s order by creation""", (parent,), as_dict=1)
File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 136, in$
Internal Server Error self.connect()
File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 86, in $
charset='utf8mb4', use_unicode = True, conv = conversions)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql$
return Connection(*args, **kwargs)
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql$
self.connect()
File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql$
raise exc