MySQL扩展操作指令的数据库连接突然断开
回答
收藏

MySQL扩展操作指令的数据库连接突然断开

C
Carve
2023-12-23 18:15·浏览量:234
C
Carve
发布于 2023-12-23 18:15234浏览

在采集完第116个短视频作品数据的时候,数据库连接突然断开

使用的是编码版的MySQL扩展操作指令



报错信息如下:

Exception in thread Thread-1:


此处省略重复错误


Exception in thread Thread-12:

Traceback (most recent call last):

 File "C:\Users\Administrator\AppData\Local\ShadowBot\users\68909615347412993\apps\609a19b3-4b8c-44b8-b4d1-15b7e2c3fd00\xbot_extensions\activity_22b47ab6\mysql.py", line 74, in __heartbeat

   self.cursor.execute("SELECT 1")

 File "C:\Users\Administrator\AppData\Local\ShadowBot\users\68909615347412993\apps\609a19b3-4b8c-44b8-b4d1-15b7e2c3fd00\venv\lib\site-packages\pymysql\cursors.py", line 153, in execute

   while self.nextset():

 File "C:\Users\Administrator\AppData\Local\ShadowBot\users\68909615347412993\apps\609a19b3-4b8c-44b8-b4d1-15b7e2c3fd00\venv\lib\site-packages\pymysql\cursors.py", line 96, in nextset

   return self._nextset(False)

 File "C:\Users\Administrator\AppData\Local\ShadowBot\users\68909615347412993\apps\609a19b3-4b8c-44b8-b4d1-15b7e2c3fd00\venv\lib\site-packages\pymysql\cursors.py", line 83, in _nextset

   conn = self._get_db()

 File "C:\Users\Administrator\AppData\Local\ShadowBot\users\68909615347412993\apps\609a19b3-4b8c-44b8-b4d1-15b7e2c3fd00\venv\lib\site-packages\pymysql\cursors.py", line 65, in _get_db

   raise err.ProgrammingError("Cursor closed")

pymysql.err.ProgrammingError: Cursor closed


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

 File "D:\env\ShadowBot\shadowbot-5.14.38\python\lib\threading.py", line 926, in _bootstrap_inner

   self.run()

 File "D:\env\ShadowBot\shadowbot-5.14.38\python\lib\threading.py", line 870, in run

   self._target(*self._args, **self._kwargs)

 File "C:\Users\Administrator\AppData\Local\ShadowBot\users\68909615347412993\apps\609a19b3-4b8c-44b8-b4d1-15b7e2c3fd00\xbot_extensions\activity_22b47ab6\mysql.py", line 78, in __heartbeat

   raise(Exception("Heartbeat failed: {e}"))

Exception: Heartbeat failed: {e}



尝试过的方案


收藏
全部回答1
最新
发布回答
回答