Hello. Using SQL in GAE project. Operations delete and update records cause
an error.The same thing happens if you ask "UPDATE ...". In this case, an
"INSERT INTO...." without errors. Please, tell me, what could be wrong?
Removal of only 1 entry takes too much time. How to bypass this error?
Code:
class Testing (webapp2.RequestHandler):
def get(self):
conn = rdbms.connect(instance=_INSTANCE_NAME, database='fortest')
cursor = conn.cursor()
cursor.execute("DELETE FROM test1 WHERE id=2;")
traceback:
Traceback (most recent call last):
File
"/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py",
line 1535, in __call__
rv = self.handle_exception(request, response, e)
File
"/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py",
line 1529, in __call__
rv = self.router.dispatch(request, response)
File
"/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py",
line 1278, in default_dispatcher
return route.handler_adapter(request, response)
File
"/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py",
line 1102, in __call__
return handler.dispatch()
File
"/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py",
line 572, in dispatch
return self.handle_exception(e, self.app.debug)
File
"/python27_runtime/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py",
line 570, in dispatch
return method(*args, **kwargs)
File "/base/data/home/apps/s~vshttlttest/2.365089095351249780/main.py", line
25, in get
cursor.execute("DELETE FROM test1 WHERE id=2;")
File
"/python27_runtime/python27_lib/versions/1/google/storage/speckle/python/api/rdbms.py",
line 499, in execute
self._DoExec(request)
File
"/python27_runtime/python27_lib/versions/1/google/storage/speckle/python/api/rdbms.py",
line 375, in _DoExec
response = self._conn.MakeRequest('Exec', request)
File
"/python27_runtime/python27_lib/versions/1/google/storage/speckle/python/api/rdbms.py",
line 873, in MakeRequest
response = self._MakeRetriableRequest(stub_method, request)
File
"/python27_runtime/python27_lib/versions/1/google/storage/speckle/python/api/rdbms.py",
line 904, in _MakeRetriableRequest
sql_exception.message))
DatabaseError: 1205: Lock wait timeout exceeded; try restarting transaction
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.