SERP Hacker support forum - serposcope

Support forum for open-source softwares built by serphacker.com : serposcope the rank checker.

You are not logged in.

#1 2016-08-12 07:32:46

Davide
Member
From: CH
Registered: 2016-03-24
Posts: 80
Website

INFO: Import Database over 1Gb "Internal Error"

By importing my 1Gb db i got the erro "Internal Error". Take a look at my log file and i see Serposcope can set max allowed packt on my sql server.

2016-08-12 09:14:04,287 qtp2052915500-15 ERROR s.c.a.AdminController - SQL import error
java.sql.SQLTransientException: Could not send query: max_allowed_packet exceeded. wrote 2095245, max_allowed_packet = 1048576

If this happened go to the Phpmyadmin select the SQL tab and run following code:

set GLOBAL max_allowed_packet = 2095245

This allows you to import a Database up to 2GB.


@Developer if this is a developer error i hope this will help you big_smile

java.sql.SQLTransientException: Could not send query: max_allowed_packet exceeded. wrote 2095245, max_allowed_packet = 1048576
	at org.mariadb.jdbc.internal.SQLExceptionMapper.get(SQLExceptionMapper.java:144) ~[serposcope.jar:na]
	at org.mariadb.jdbc.internal.SQLExceptionMapper.throwException(SQLExceptionMapper.java:106) ~[serposcope.jar:na]
	at org.mariadb.jdbc.MySQLStatement.executeQueryEpilog(MySQLStatement.java:252) ~[serposcope.jar:na]
	at org.mariadb.jdbc.MySQLStatement.execute(MySQLStatement.java:278) ~[serposcope.jar:na]
	at org.mariadb.jdbc.MySQLStatement.executeUpdate(MySQLStatement.java:348) ~[serposcope.jar:na]
	at org.mariadb.jdbc.MySQLStatement.executeUpdate(MySQLStatement.java:380) ~[serposcope.jar:na]
	at com.zaxxer.hikari.pool.ProxyStatement.executeUpdate(ProxyStatement.java:120) ~[serposcope.jar:na]
	at com.zaxxer.hikari.pool.HikariProxyStatement.executeUpdate(HikariProxyStatement.java) ~[serposcope.jar:na]
	at com.serphacker.serposcope.db.base.ExportDB.importStream(ExportDB.java:64) ~[serposcope.jar:na]
	at serposcope.controllers.admin.AdminController.importSQL(AdminController.java:157) ~[serposcope.jar:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_60]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_60]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_60]
	at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_60]
	at ninja.params.ControllerMethodInvoker.invoke(ControllerMethodInvoker.java:57) [serposcope.jar:na]
	at ninja.FilterChainEnd.next(FilterChainEnd.java:49) [serposcope.jar:na]
	at serposcope.filters.XSRFFilter.filter(XSRFFilter.java:35) [serposcope.jar:na]
	at ninja.FilterChainImpl.next(FilterChainImpl.java:35) [serposcope.jar:na]
	at serposcope.filters.AdminFilter.filter(AdminFilter.java:39) [serposcope.jar:na]
	at ninja.FilterChainImpl.next(FilterChainImpl.java:35) [serposcope.jar:na]
	at serposcope.filters.BaseFilter.filter(BaseFilter.java:61) [serposcope.jar:na]
	at ninja.FilterChainImpl.next(FilterChainImpl.java:35) [serposcope.jar:na]
	at ninja.NinjaDefault.onRouteRequest(NinjaDefault.java:102) [serposcope.jar:na]
	at ninja.servlet.NinjaServletDispatcher.service(NinjaServletDispatcher.java:86) [serposcope.jar:na]
	at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:287) [serposcope.jar:na]
	at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:277) [serposcope.jar:na]
	at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:182) [serposcope.jar:na]
	at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) [serposcope.jar:na]
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85) [serposcope.jar:na]
	at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:119) [serposcope.jar:na]
	at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:133) [serposcope.jar:na]
	at com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:130) [serposcope.jar:na]
	at com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:203) [serposcope.jar:na]
	at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:130) [serposcope.jar:na]
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [serposcope.jar:na]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [serposcope.jar:na]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [serposcope.jar:na]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [serposcope.jar:na]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [serposcope.jar:na]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [serposcope.jar:na]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [serposcope.jar:na]
	at org.eclipse.jetty.server.Server.handle(Server.java:497) [serposcope.jar:na]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [serposcope.jar:na]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [serposcope.jar:na]
	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [serposcope.jar:na]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [serposcope.jar:na]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [serposcope.jar:na]
	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_60]
Caused by: org.mariadb.jdbc.internal.common.QueryException: Could not send query: max_allowed_packet exceeded. wrote 2095245, max_allowed_packet = 1048576
	at org.mariadb.jdbc.internal.mysql.MySQLProtocol.executeQuery(MySQLProtocol.java:1015) ~[serposcope.jar:na]
	at org.mariadb.jdbc.internal.mysql.MySQLProtocol.executeQuery(MySQLProtocol.java:1003) ~[serposcope.jar:na]
	at org.mariadb.jdbc.MySQLStatement.execute(MySQLStatement.java:271) ~[serposcope.jar:na]
	... 44 common frames omitted
Caused by: org.mariadb.jdbc.internal.common.packet.MaxAllowedPacketException: max_allowed_packet exceeded. wrote 2095245, max_allowed_packet = 1048576
	at org.mariadb.jdbc.internal.common.packet.PacketOutputStream.internalFlush(PacketOutputStream.java:128) ~[serposcope.jar:na]
	at org.mariadb.jdbc.internal.common.packet.PacketOutputStream.finishPacket(PacketOutputStream.java:80) ~[serposcope.jar:na]
	at org.mariadb.jdbc.internal.common.packet.commands.StreamedQueryPacket.send(StreamedQueryPacket.java:98) ~[serposcope.jar:na]
	at org.mariadb.jdbc.internal.mysql.MySQLProtocol.executeQuery(MySQLProtocol.java:1012) ~[serposcope.jar:na]
	... 46 common frames omitted

Last edited by Davide (2016-08-12 07:33:59)


easy-develope.ch ¦ kontakt@easy-develope.ch

Offline

#2 2016-08-12 07:37:40

serphacker
Administrator
Registered: 2014-06-13
Posts: 411

Re: INFO: Import Database over 1Gb "Internal Error"

Hi,

max_allowed_packet is not related to the total size of your import, you can import a 10GB dump with only a max_allowed_packet of 16MB but in your case it is configured to 1MB and it is by far too low.

this error is not related to serposcope, it should be fixed on mysql configuration.

max_allowed_packet = 2095245

it won't set max packets to 2GB but to 2MB, I would recommand to set it to at least 128MB like :

max_allowed_packet = 128M

it should be done in the mysql configuration file not via phpmyadmin, in the file my.cnf under [mysqld] section. Google "how to configure max_allowed_packet"

Offline

#3 2016-08-12 08:44:41

Davide
Member
From: CH
Registered: 2016-03-24
Posts: 80
Website

Re: INFO: Import Database over 1Gb "Internal Error"

serphacker wrote:

Hi,

max_allowed_packet is not related to the total size of your import, you can import a 10GB dump with only a max_allowed_packet of 16MB but in your case it is configured to 1MB and it is by far too low.

this error is not related to serposcope, it should be fixed on mysql configuration.

max_allowed_packet = 2095245

it won't set max packets to 2GB but to 2MB, I would recommand to set it to at least 128MB like :

max_allowed_packet = 128M

it should be done in the mysql configuration file not via phpmyadmin, in the file my.cnf under [mysqld] section. Google "how to configure max_allowed_packet"

Ok now i got it, thank you.

Now i undersand what you mean. But i changed the packet size using phpmyadmin in sql tab. it works to and have the same effect.


easy-develope.ch ¦ kontakt@easy-develope.ch

Offline

#4 2016-08-12 08:48:44

serphacker
Administrator
Registered: 2014-06-13
Posts: 411

Re: INFO: Import Database over 1Gb "Internal Error"

oh yes indeed, sorry I misread it didn't worked using phpmyadmin.

Offline

#5 2016-08-12 08:50:24

serphacker
Administrator
Registered: 2014-06-13
Posts: 411

Re: INFO: Import Database over 1Gb "Internal Error"

but the advantage of doing it in my.cnf is that it will persist upon reboot. If you do it via set global, default max_allowed_packet will only last until your next mysql restart (or reboot). Better to do it in my.cnf (and you should restart mysql after editing my.cnf)

Offline

#6 2016-08-12 08:54:17

Davide
Member
From: CH
Registered: 2016-03-24
Posts: 80
Website

Re: INFO: Import Database over 1Gb "Internal Error"

serphacker wrote:

but the advantage of doing it in my.cnf is that it will persist upon reboot. If you do it via set global, default max_allowed_packet will only last until your next mysql restart (or reboot). Better to do it in my.cnf (and you should restart mysql after editing my.cnf)

yes but i dont need this settings in future, all my db of websites arnt big like this big_smile

For now i hope i didnt get any errory by checking ranks. i have 50 paid proxy, anti-captcha & deathbycaptcha running and my db changed to mysql with over 2000 keywords big_smile


easy-develope.ch ¦ kontakt@easy-develope.ch

Offline

Board footer