[GH-ISSUE #101] Running error #66

Closed
opened 2026-02-26 10:35:56 +03:00 by kerem · 1 comment
Owner

Originally created by @blackyzero on GitHub (Aug 10, 2016).
Original GitHub issue: https://github.com/PowerDNS-Admin/PowerDNS-Admin/issues/101

Hi Team,

Several times, when i reload the webpage, i get following error,

sqlalchemy.exc.OperationalError
OperationalError: (_mysql_exceptions.OperationalError) (2006, 'MySQL server has gone away') [SQL: u'SELECT setting.id AS setting_id, setting.name AS setting_name, setting.value AS setting_value \nFROM setting \nWHERE setting.name = %s \n LIMIT %s'] [parameters: ('maintenance', 1)]

Full error following as below:

This is the Copy/Paste friendly version of the traceback. You can also paste this traceback into a gist: create paste
Traceback (most recent call last):
File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/flask/app.py", line 2000, in call
return self.wsgi_app(environ, start_response)
File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/werkzeug/contrib/fixers.py", line 152, in call
return self.app(environ, start_response)
File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/flask/app.py", line 1991, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/flask/app.py", line 1567, in handle_exception
reraise(exc_type, exc_value, tb)
File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/flask/app.py", line 1988, in wsgi_app
response = self.full_dispatch_request()
File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/flask/app.py", line 1641, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/flask/app.py", line 1544, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/flask/app.py", line 1637, in full_dispatch_request
rv = self.preprocess_request()
File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/flask/app.py", line 1837, in preprocess_request
rv = func()
File "/var/www/testdomain.com/adns/app/views.py", line 64, in before_request
maintenance = Setting.query.filter(Setting.name == 'maintenance').first()
File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2469, in first
ret = list(self[0:1])
File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2292, in getitem
return list(res)
File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2571, in iter
return self._execute_and_instances(context)
File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2586, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute
return meth(self, multiparams, params)
File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
compiled_sql, distilled_params
File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
context)
File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
exc_info
File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
context)
File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
cursor.execute(statement, parameters)
File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
self.errorhandler(self, exc, value)
File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (_mysql_exceptions.OperationalError) (2006, 'MySQL server has gone away') [SQL: u'SELECT setting.id AS setting_id, setting.name AS setting_name, setting.value AS setting_value \nFROM setting \nWHERE setting.name = %s \n LIMIT %s'] [parameters: ('maintenance', 1)]
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

dump() shows all variables in the frame
dump(obj) dumps all that's known about the object
Brought to you by DON'T PANIC, your friendly Werkzeug powered traceback interpreter.

Originally created by @blackyzero on GitHub (Aug 10, 2016). Original GitHub issue: https://github.com/PowerDNS-Admin/PowerDNS-Admin/issues/101 Hi Team, ``` Several times, when i reload the webpage, i get following error, sqlalchemy.exc.OperationalError OperationalError: (_mysql_exceptions.OperationalError) (2006, 'MySQL server has gone away') [SQL: u'SELECT setting.id AS setting_id, setting.name AS setting_name, setting.value AS setting_value \nFROM setting \nWHERE setting.name = %s \n LIMIT %s'] [parameters: ('maintenance', 1)] ``` Full error following as below: > This is the Copy/Paste friendly version of the traceback. You can also paste this traceback into a gist: create paste > Traceback (most recent call last): > File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/flask/app.py", line 2000, in **call** > return self.wsgi_app(environ, start_response) > File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/werkzeug/contrib/fixers.py", line 152, in **call** > return self.app(environ, start_response) > File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/flask/app.py", line 1991, in wsgi_app > response = self.make_response(self.handle_exception(e)) > File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/flask/app.py", line 1567, in handle_exception > reraise(exc_type, exc_value, tb) > File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/flask/app.py", line 1988, in wsgi_app > response = self.full_dispatch_request() > File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/flask/app.py", line 1641, in full_dispatch_request > rv = self.handle_user_exception(e) > File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/flask/app.py", line 1544, in handle_user_exception > reraise(exc_type, exc_value, tb) > File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/flask/app.py", line 1637, in full_dispatch_request > rv = self.preprocess_request() > File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/flask/app.py", line 1837, in preprocess_request > rv = func() > File "/var/www/testdomain.com/adns/app/views.py", line 64, in before_request > maintenance = Setting.query.filter(Setting.name == 'maintenance').first() > File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2469, in first > ret = list(self[0:1]) > File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2292, in **getitem** > return list(res) > File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2571, in **iter** > return self._execute_and_instances(context) > File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2586, in _execute_and_instances > result = conn.execute(querycontext.statement, self._params) > File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute > return meth(self, multiparams, params) > File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection > return connection._execute_clauseelement(self, multiparams, params) > File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement > compiled_sql, distilled_params > File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context > context) > File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception > exc_info > File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause > reraise(type(exception), exception, tb=exc_tb) > File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context > context) > File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute > cursor.execute(statement, parameters) > File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute > self.errorhandler(self, exc, value) > File "/var/www/testdomain.com/adns/flask/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler > raise errorclass, errorvalue > OperationalError: (_mysql_exceptions.OperationalError) (2006, 'MySQL server has gone away') [SQL: u'SELECT setting.id AS setting_id, setting.name AS setting_name, setting.value AS setting_value \nFROM setting \nWHERE setting.name = %s \n LIMIT %s'] [parameters: ('maintenance', 1)] > The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error. > To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side. > > You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection: > > dump() shows all variables in the frame > dump(obj) dumps all that's known about the object > Brought to you by DON'T PANIC, your friendly Werkzeug powered traceback interpreter.
kerem closed this issue 2026-02-26 10:35:57 +03:00
Author
Owner

@ngoduykhanh commented on GitHub (Aug 12, 2016):

This is problem with connectivity between the application and MySQL. Please double check your MySQL server config to avoid error "MySQL server has gone away"

<!-- gh-comment-id:239384083 --> @ngoduykhanh commented on GitHub (Aug 12, 2016): This is problem with connectivity between the application and MySQL. Please double check your MySQL server config to avoid error "MySQL server has gone away"
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/PowerDNS-Admin-PowerDNS-Admin#66
No description provided.