Code Monkey home page Code Monkey logo

Comments (2)

jathanism avatar jathanism commented on July 30, 2024

It looks like the root cause was an uncaught OperationalError:

2015-04-07 19:59:32,551 ERROR   Uncaught exception GET /api/sites/1 (10.16.16.85)
Traceback (most recent call last):
  File "/srv/nsot/envs/nsot/lib/python2.7/site-packages/tornado/web.py", line 1309, in _ex
ecute
    result = self.prepare()
  File "/srv/nsot/envs/nsot/lib/python2.7/site-packages/nsot/handlers/util.py", line 192,
in prepare
    BaseHandler.prepare(self)
  File "/srv/nsot/envs/nsot/lib/python2.7/site-packages/nsot/handlers/util.py", line 70, i
n prepare
    if not self.current_user:
  File "/srv/nsot/envs/nsot/lib/python2.7/site-packages/tornado/web.py", line 1022, in cur
rent_user
    self._current_user = self.get_current_user()
  File "/srv/nsot/envs/nsot/lib/python2.7/site-packages/nsot/handlers/util.py", line 156,
in get_current_user
    user = models.User.verify_auth_token(email, auth_token)
  File "/srv/nsot/envs/nsot/lib/python2.7/site-packages/nsot/models.py", line 306, in veri
fy_auth_token
    user = User.query().filter_by(email=email).scalar()
  File "/srv/nsot/envs/nsot/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 242
6, in scalar
    ret = self.one()
  File "/srv/nsot/envs/nsot/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 239
5, in one
    ret = list(self)
  File "/srv/nsot/envs/nsot/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 243
8, in __iter__
    return self._execute_and_instances(context)
  File "/srv/nsot/envs/nsot/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 245
3, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/srv/nsot/envs/nsot/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 7
29, in execute
    return meth(self, multiparams, params)
  File "/srv/nsot/envs/nsot/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line
322, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/srv/nsot/envs/nsot/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 8
26, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/srv/nsot/envs/nsot/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 9
58, in _execute_context
    context)
  File "/srv/nsot/envs/nsot/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1
159, in _handle_dbapi_exception
    exc_info
  File "/srv/nsot/envs/nsot/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 1
99, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb)
  File "/srv/nsot/envs/nsot/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 9
51, in _execute_context
    context)
  File "/srv/nsot/envs/nsot/lib/python2.7/site-packages/sqlalchemy/engine/default.py", lin
e 436, in do_execute
    cursor.execute(statement, parameters)
  File "/srv/nsot/envs/nsot/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in
execute
    self.errorhandler(self, exc, value)
  File "/srv/nsot/envs/nsot/lib/python2.7/site-packages/MySQLdb/connections.py", line 36,
in defaulterrorhandler
    raise errorclass, errorvalue
OperationalError: (OperationalError) (2006, 'MySQL server has gone away') 'SELECT users.id
 AS users_id, users.email AS users_email, users.secret_key AS users_secret_key \nFROM user
s \nWHERE users.email = %s' ('jathan@locallhost',)

from nsot.

jathanism avatar jathanism commented on July 30, 2024

It looks like on a long-running server instance where nobody has queried the API for a while, the DB session goes idle and loses the connection to the MySQL server. This is a flaw in the scoped_session implementation and needs to be reconsidered.

from nsot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.