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

Crash random perché perde la connessione al DB #3

Open
drago-96 opened this issue Feb 19, 2019 · 0 comments
Open

Crash random perché perde la connessione al DB #3

drago-96 opened this issue Feb 19, 2019 · 0 comments
Labels

Comments

@drago-96
Copy link
Contributor

Ogni tanto il sito non mostra più le statistiche; questo è dovuto al fatto che in qualche modo perde la connessione al DB, e quindi non riesce più ad eseguire query.
Allego un po' di tracebacks:

127.0.0.1 - - [2019-02-19 03:22:52] "GET // HTTP/1.1" 200 1927 0.000470
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gevent/greenlet.py", line 534, in run
    result = self._run(*self.args, **self.kwargs)
  File "/home/subotto-web/24web/24h.py", line 68, in update_scores
    ORDER BY year DESC LIMIT 1;""");
OperationalError: server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

<Greenlet at 0x7fbe8c103410: <bound method SubottoWeb.update_scores of <__main__.SubottoWeb object at 0x7fbe8f707f50>>> failed with OperationalError

Poi si lamenta che la connessione si è chiusa:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gevent/pywsgi.py", line 884, in handle_one_response
    self.run_application()
  File "/usr/lib/python2.7/dist-packages/gevent/pywsgi.py", line 870, in run_application
    self.result = self.application(self.environ, self.start_response)
  File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 599, in __call__
    return self.app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 40, in <lambda>
    return update_wrapper(lambda *a: f(*a)(*a[-2:]), f)
  File "/home/subotto-web/24web/24h.py", line 543, in __call__
    data = self.score_handler(data)
  File "/home/subotto-web/24web/24h.py", line 139, in score_handler
    ORDER BY sec;""", (data['year'],))
OperationalError: SSL connection has been closed unexpectedly

E infine non riesce ad ottenere una nuova connessione:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gevent/pywsgi.py", line 884, in handle_one_response
    self.run_application()
  File "/usr/lib/python2.7/dist-packages/gevent/pywsgi.py", line 870, in run_application
    self.result = self.application(self.environ, self.start_response)
  File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 599, in __call__
    return self.app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 40, in <lambda>
    return update_wrapper(lambda *a: f(*a)(*a[-2:]), f)
  File "/home/subotto-web/24web/24h.py", line 545, in __call__
    data = self.stats_handler(data)
  File "/home/subotto-web/24web/24h.py", line 156, in stats_handler
    with self.get_cursor() as cur:
  File "/home/subotto-web/24web/24h.py", line 108, in get_cursor
    return c.cursor()
InterfaceError: connection already closed
@drago-96 drago-96 added the bug label Feb 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant