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

Performance bug of server #58

Open
esikachev opened this issue Feb 3, 2017 · 2 comments
Open

Performance bug of server #58

esikachev opened this issue Feb 3, 2017 · 2 comments

Comments

@esikachev
Copy link
Owner

When server working on production lab we have the next error when you try to connect to host which exist in DB:
Traceback (most recent call last): File "/home/ubuntu/my-dev-server/.tox/venv/lib/python2.7/site-packages/flask/app.py", line 1994, in __call__ return self.wsgi_app(environ, start_response) File "/home/ubuntu/my-dev-server/.tox/venv/lib/python2.7/site-packages/flask/app.py", line 1985, in wsgi_app response = self.handle_exception(e) File "/home/ubuntu/my-dev-server/.tox/venv/lib/python2.7/site-packages/flask/app.py", line 1540, in handle_exception reraise(exc_type, exc_value, tb) File "/home/ubuntu/my-dev-server/.tox/venv/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app response = self.full_dispatch_request() File "/home/ubuntu/my-dev-server/.tox/venv/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/ubuntu/my-dev-server/.tox/venv/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/ubuntu/my-dev-server/.tox/venv/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "/home/ubuntu/my-dev-server/.tox/venv/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/home/ubuntu/my-dev-server/my_dev_server/server/main.py", line 72, in user_get models.User.username == id)).first() File "/home/ubuntu/my-dev-server/.tox/venv/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2659, in first ret = list(self[0:1]) File "/home/ubuntu/my-dev-server/.tox/venv/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2457, in __getitem__ return list(res) File "/home/ubuntu/my-dev-server/.tox/venv/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2761, in __iter__ return self._execute_and_instances(context) File "/home/ubuntu/my-dev-server/.tox/venv/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2776, in _execute_and_instances result = conn.execute(querycontext.statement, self._params) File "/home/ubuntu/my-dev-server/.tox/venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute return meth(self, multiparams, params) File "/home/ubuntu/my-dev-server/.tox/venv/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection return connection._execute_clauseelement(self, multiparams, params) File "/home/ubuntu/my-dev-server/.tox/venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement compiled_sql, distilled_params File "/home/ubuntu/my-dev-server/.tox/venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1078, in _execute_context None, None) File "/home/ubuntu/my-dev-server/.tox/venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception exc_info File "/home/ubuntu/my-dev-server/.tox/venv/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause reraise(type(exception), exception, tb=exc_tb, cause=cause) File "/home/ubuntu/my-dev-server/.tox/venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1071, in _execute_context conn = self._revalidate_connection() File "/home/ubuntu/my-dev-server/.tox/venv/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 391, in _revalidate_connection "Can't reconnect until invalid " StatementError: (sqlalchemy.exc.InvalidRequestError) Can't reconnect until invalid transaction is rolled back [SQL: u'SELECT users.id AS users_id, users.username AS users_username, users.email AS users_email, users.password AS users_password, users.registered_on AS users_ registered_on \nFROM users \nWHERE users.id = %(id_1)s OR users.username = %(username_1)s \n LIMIT %(param_1)s'] [parameters: [immutabledict({})]]

WORKAROUND: Restart the server

@esikachev esikachev added this to the alpha milestone Feb 3, 2017
@esikachev esikachev added this to TODO in my-dev-server Feb 7, 2017
@esikachev esikachev removed this from the alpha milestone Feb 18, 2017
@IlyaMenkov
Copy link
Collaborator

I dont understand how to reproduce this bug. (!?!?!)

@esikachev
Copy link
Owner Author

This bug was found on pre-production server. We need several days for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants