V 友们,帮忙给点排查意见
问题不是必现的,偶尔就出现一次
问了 AI 给的也是模糊的的回答
连接 pg 数据库用的是 pool = PooledDB()
执行代码如下
def dbQuery(self, sql):
conn = pool.connection()
cur = conn.cursor()
cur.execute(sql)
result = cur.fetchall()
cur.close()
conn.close()
return result
报错如下:
could not receive data from server: Software caused connection abort (0x00002745/10053)
Traceback (most recent call last):
File "aaTestV5.py", line 844, in process
input_values = self.getInputValuesInfo()
File "aa_process.py", line 117, in getInputValuesInfo
order_list = super(tf, self).getInputValuesInfo()
File "aaTestV5.py", line 555, in getInputValuesInfo
results_fromno, no_list = self.getFromnoResult()
File "aa_process.py", line 366, in getFromnoResult
return self.getFromnoResultInner(False)
File "aa_process.py", line 320, in getFromnoResultInner
results_fromno, no_list = super(tf, self).getFromnoResult(True)
File "aaTestV5.py", line 119, in getFromnoResult
result_fromno1 = self.dbQuery(query_sql)
File "aa_process.py", line 391, in dbQuery
return super(tf, self).dbQuery(sql)
File "aaTestV5.py", line 823, in dbQuery
cur.execute(sql)
File "\python\lib\site-packages\dbutils\steady_db.py", line 598, in tough_method
result = method(*args, **kwargs) # try to execute
psycopg2.DatabaseError: could not receive data from server: Software caused connection abort (0x00002745/10053)
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.