mooder
mooder copied to clipboard
提交贡献之后,后台报500错误
提交贡献(文章)之后,其他页面正常,后台报500错误,具体错误如下,请问是什么原因? [19/Jan/2019 14:23:26] "GET /management/ HTTP/1.1" 500 27 Exception ignored in: <generator object cursor_iter at 0x00000000048A7ED0> Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-p ackages\django\db\models\sql\compiler.py", line 1292, in cursor_iter cursor.close() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-p ackages\MySQLdb\cursors.py", line 85, in close while self.nextset(): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-p ackages\MySQLdb\cursors.py", line 173, in nextset nr = db.next_result() _mysql_exceptions.OperationalError: (2006, '')
可能是你提交的SQL语句太大?还是什么原因,这个得查Mysql的日志。
参考一下:https://stackoverflow.com/questions/14163429/python-and-django-operationalerror-2006-mysql-server-has-gone-away
建议使用postgres作为数据库。
数据并不大,内容不到100个字,Mysql也没有这个错误(不是gone-away的错误)。