newcrawler
newcrawler copied to clipboard
max_allowed_packet
2017-06-28 09:48:59,005--ERROR --Save data failure, url:https://www.pornhub.com/view_video.php?viewkey=ph56c925e408be4, log:javax.jdo.JDODataStoreException: Insert of object "com.soso.crawler.model.Crawler_CrawlDataTable@58a70d1" using statement "INSERT INTO CRAWLER_CRAWLDATATABLE
(FETCHTIMES
,SITEID
,DEPLOYLOG
,STATUS
,MD5DIGEST
,CRAWLURL
,CRAWLURLID
,ORDERINDEX
,CHECKLOG
,CREATEDATE
,DATA
,MD5DIGESTHASH
) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)" failed : Packet for query is too large (1764526 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable.
NestedThrowables:
com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1764526 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable.
mysql -hlocalhost -uroot -p show variables like 'max_allowed_packet'
#change to 5M /etc/my.cnf for MySQL instance, or /etc/my.cnf.d/server.cnf for MariaDB [mysqld] max_allowed_packet=5M
restart mysql