我設置了SOLR。我曾經將數據(十萬個)導入solr索引,它可以正常工作。SOLR中的大數據導致數據導入失敗
我現在想以大數據(10+萬盧比記錄)導入到Solr的索引。我已經安裝數據-config.xml文件,然後我開始全進口,但它失敗並在下面給出
索引提到的錯誤而失敗。回滾所有更改。
我存儲Solr的啓動日誌文件solr.err賦予錯誤:
Jul 31, 2012 10:19:33 AM org.apache.solr.update.DirectUpdateHandler2 rollback
SEVERE: Ignoring Error when closing connection
at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:637)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2677)
at com.mysql.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:4749)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2677)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2627)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:841)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:681)
... 6 more
Jul 31, 2012 10:19:44 AM org.apache.solr.update.DirectUpdateHandler2 rollback
SEVERE: Ignoring Error when closing connection
at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:637)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2677)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2709)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2677)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2709)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2677)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2627)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:841)
at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:681)
... 6 more
Jul 31, 2012 10:19:44 AM org.apache.solr.update.DirectUpdateHandler2 rollback
SEVERE: Ignoring Error when closing connection at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:637) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2677)
Jul 31, 2012 10:19:44 AM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: end_rollback
Jul 31, 2012 10:19:44 AM org.apache.solr.handler.dataimport.JdbcDataSource closeConnection
SEVERE: Ignoring Error when closing connection
com.mysql.jdbc.PacketTooBigException: Packet for query is too large (7959657 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable.
at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:637)
at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:420)
at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3118)
at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2288)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2709)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2677)
at com.mysql.jdbc.ConnectionImpl.rollbackNoChecks(ConnectionImpl.java:4863)
at com.mysql.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:4749)
at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4358)
at com.mysql.jdbc.ConnectionImpl.close(ConnectionImpl.java:1607)
@ ataConfig.java:342) 在org.apache.solr.handler .dataimport.DataImporter.doFullImport(DataImporter.java:383) 在org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:445) 在org.apache.solr.handl er.dataimport.DataImporter $ 1.run(DataImporter.java:426)
我使用4核處理器4GB內存。
什麼需要的MySQL/Java配置變更來解決這個問題?
難道你沒有看到MySQL報告「你可以通過設置max_allowed_packet'變量來更改服務器上的這個值嗎?這就是你需要做的。 – 2012-07-31 11:28:52