今天在使用JDBC操作mysql时遇到下面的异常信息:
[quote]The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at com.tomymap.galaxy.virgo.util.DbService.getConnection(DbService.java:66)
at com.tomymap.galaxy.virgo.util.DbService.getConnection(DbService.java:46)
at com.tomymap.galaxy.virgo.dao.PNNDao.getConnection(PNNDao.java:51)
at com.tomymap.galaxy.virgo.dao.DaoBase.executeUpdate(DaoBase.java:69)
at com.tomymap.galaxy.virgo.dao.PNNDao.updatePNNRelation(PNNDao.java:161)
at com.tomymap.galaxy.virgo.pnn.PyramidNeuralNetwork.buildPNNRelations(PyramidNeuralNetwork.java:400)
at com.tomymap.galaxy.virgo.pnn.PyramidNeuralNetwork.incrementalGenPNN(PyramidNeuralNetwork.java:144)
at com.tomymap.galaxy.virgo.pnn.PyramidNeuralNetwork.main(PyramidNeuralNetwork.java:410)[/quote]
着实让人崩溃的信息,花费了一天的时间来解决。
不罗嗦,直接描述解决办法。
交互:
300k records
300k * 10 = 3M次访问mysql
处理时间0.5h以内
解决方法:
已经迁移至新博客:
[url]http://www.mannyisbusy.com/the-last-packet-sent-successfully-to-the-server-was-0-milliseconds-ago/[/url]
[quote]The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at com.tomymap.galaxy.virgo.util.DbService.getConnection(DbService.java:66)
at com.tomymap.galaxy.virgo.util.DbService.getConnection(DbService.java:46)
at com.tomymap.galaxy.virgo.dao.PNNDao.getConnection(PNNDao.java:51)
at com.tomymap.galaxy.virgo.dao.DaoBase.executeUpdate(DaoBase.java:69)
at com.tomymap.galaxy.virgo.dao.PNNDao.updatePNNRelation(PNNDao.java:161)
at com.tomymap.galaxy.virgo.pnn.PyramidNeuralNetwork.buildPNNRelations(PyramidNeuralNetwork.java:400)
at com.tomymap.galaxy.virgo.pnn.PyramidNeuralNetwork.incrementalGenPNN(PyramidNeuralNetwork.java:144)
at com.tomymap.galaxy.virgo.pnn.PyramidNeuralNetwork.main(PyramidNeuralNetwork.java:410)[/quote]
着实让人崩溃的信息,花费了一天的时间来解决。
不罗嗦,直接描述解决办法。
配置:
ubuntu10.10
5.1.49-1ubuntu8.1
mysql-connector-java-5.1.18.jar
交互:
300k records
300k * 10 = 3M次访问mysql
处理时间0.5h以内
解决方法:
已经迁移至新博客:
[url]http://www.mannyisbusy.com/the-last-packet-sent-successfully-to-the-server-was-0-milliseconds-ago/[/url]