Php “如何排除故障”;在查询过程中与MySQL服务器的连接中断";?
我有一个Php “如何排除故障”;在查询过程中与MySQL服务器的连接中断";?,php,mysql,full-text-search,silverstripe,Php,Mysql,Full Text Search,Silverstripe,我有一个Silverstripe网站连接到MySql服务器版本5.6.17,托管在Rackspace 我一直在努力解决两个不时同步发生的错误,但我无法找出根本原因 Error: Couldn't run query: COMMIT; Lost connection to MySQL server during query At line 598 in /home/dployio/deployments/production/1733814/framework/model/MySQLDatabas
Silverstripe
网站连接到MySql
服务器版本5.6.17,托管在Rackspace
我一直在努力解决两个不时同步发生的错误,但我无法找出根本原因
Error: Couldn't run query: COMMIT; Lost connection to MySQL server during query
At line 598 in /home/dployio/deployments/production/1733814/framework/model/MySQLDatabase.php
SS_CustomLogErrorEmailFormatter->format(Array)
Custom_SS_LogEmailWriter.php:43
Custom_SS_LogEmailWriter->_write(Array)
Abstract.php:85
Zend_Log_Writer_Abstract->write(Array)
Log.php:428
Zend_Log->log(Array,3,)
Log.php:178
SS_Log::log(Array,3)
Debug.php:301
Debug::fatalHandler(256,Couldn't run query: COMMIT; Lost connection to MySQL server during query,/home/dployio/deployments/production/1733814/framework/model/MySQLDatabase.php,598,Array)
Debug.php:553
errorHandler(256,Couldn't run query: COMMIT; Lost connection to MySQL server during query,/home/dployio/deployments/production/1733814/framework/model/MySQLDatabase.php,598)
MySQLDatabase.php:598
MySQLDatabase->databaseError(Couldn't run query: COMMIT; Lost connection to MySQL server during query,256)
MySQLDatabase.php:150
MySQLDatabase->query(COMMIT;,256)
DB.php:208
DB::query(COMMIT;)
SapphireTransactionManager.php:69
SapphireTransactionManager->commit()
SapphireTransactionManager.php:99
SapphireTransactionManager->transaction(Closure$NewsRequestManager::postNews;280716067)
我尝试过的事情(显然没有帮助)
- 修复
表,因为它谈到崩溃状态News\u标签
- 因为有些地方提到这是一个潜在的原因,所以就对包大小进行了调整
- 向Rackspace询问服务器错误日志,但未发现任何相关信息
- 在mysql控制台上运行无法从PHP执行的查询,它成功了,所以客户端可能需要更改
正如我之前提到的,解决这个问题的方法是重新创建全文索引
Headline\u SummaryHtmlFree\u BodyHtmlFree
,但我不知道为什么。您是否在同一个框中运行web服务器和MySQL?@Machavity:不,它们不在同一个框中第一个查询需要多长时间才能执行?没有,非常快。这是一个插入表,记录不超过100条。发送的文本似乎不相关,长文本和短文本都会失败。我见过在长时间运行的脚本上发生错误,从外部源或其他地方下载大文件,mysqli连接超时。在这种情况下,它使用的是Rackspace CloudDB。这听起来像是在一个相当短的web请求的上下文中,对吗?
Error: Couldn't run query: INSERT INTO "News_Tags" ("NewsID","TagID") VALUES (91, 1225) Table './os_production/News_Tags' is marked as crashed and should be repaired
At line 598 in /home/dployio/deployments/production/1733814/framework/model/MySQLDatabase.php
SS_CustomLogErrorEmailFormatter->format(Array)
Custom_SS_LogEmailWriter.php:43
Custom_SS_LogEmailWriter->_write(Array)
Abstract.php:85
Zend_Log_Writer_Abstract->write(Array)
Log.php:428
Zend_Log->log(Array,3,)
Log.php:178
SS_Log::log(Array,3)
Debug.php:301
Debug::fatalHandler(256,Couldn't run query: INSERT INTO "News_Tags" ("NewsID","TagID") VALUES (91, 1225) Table './os_production/News_Tags' is marked as crashed and should be repaired,/home/dployio/deployments/production/1733814/framework/model/MySQLDatabase.php,598,Array)
Debug.php:553
errorHandler(256,Couldn't run query: INSERT INTO "News_Tags" ("NewsID","TagID") VALUES (91, 1225) Table './os_production/News_Tags' is marked as crashed and should be repaired,/home/dployio/deployments/production/1733814/framework/model/MySQLDatabase.php,598)
MySQLDatabase.php:598
MySQLDatabase->databaseError(Couldn't run query: INSERT INTO "News_Tags" ("NewsID","TagID") VALUES (91, 1225) Table './os_production/News_Tags' is marked as crashed and should be repaired,256)
MySQLDatabase.php:150
MySQLDatabase->query(INSERT INTO "News_Tags" ("NewsID","TagID") VALUES (91, 1225),256)
DB.php:208
DB::query(INSERT INTO "News_Tags" ("NewsID","TagID") VALUES (91, 1225))
UnitOfWork.php:415
UnitOfWork->commit()
SapphireTransactionManager.php:62
FULLTEXT INDEX Headline_SummaryHtmlFree_BodyHtmlFree
(Headline, SummaryHtmlFree, BodyHtmlFree);