tigase / tigase-server

(M) Highly optimized, extremely modular and very flexible XMPP/Jabber server
https://tigase.net
GNU Affero General Public License v3.0
322 stars 107 forks source link

Hi! I have on mysql socketTimeout Exception #59

Open zhangle910522 opened 3 years ago

zhangle910522 commented 3 years ago

Describe the bug i use tigase 8.0.0,I think pass http rest interface add user,but request not return。 this is often appear,begin start,is work。

use arthas trace tigase.db.AuthRepositoryMDImpl addUser

---ts=2020-10-22 18:46:31;thread_name=http-server-pool-4;id=320;is_daemon=true;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@27bc2616
    `---[925992.285882ms] tigase.db.AuthRepositoryMDImpl:addUser()
        +---[0.010391ms] tigase.xmpp.jid.BareJID:getDomain() #52
        +---[0.0092ms] tigase.db.AuthRepositoryMDImpl:getRepo() #52
        `---[925992.201749ms] tigase.db.AuthRepository:addUser() #55

my thread stack:

http-server-pool-2" #777 daemon prio=5 os_prio=0 tid=0x00007fe194012000 nid=0x33d6 runnable [0x00007fe17e4b1000]   
java.lang.Thread.State: RUNNABLE        
at java.net.SocketInputStream.socketRead0(Native Method)        
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)        
at java.net.SocketInputStream.read(SocketInputStream.java:171)        
at java.net.SocketInputStream.read(SocketInputStream.java:141)        
at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:101)        
at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:144)        
at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:174)        
- locked <0x0000000684dc4cc0> (a com.mysql.jdbc.util.ReadAheadInputStream)        
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:3011)
        at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3472)
        at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3462)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3905)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2495)
        - locked <0x0000000684e32268> (a com.mysql.jdbc.JDBC4Connection)
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1903)
        - locked <0x0000000684e32268> (a com.mysql.jdbc.JDBC4Connection)
        at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2011)
        - locked <0x0000000684e32268> (a com.mysql.jdbc.JDBC4Connection)
        at tigase.db.jdbc.DataRepositoryImpl.checkConnection(DataRepositoryImpl.java:452)
        - locked <0x00000006808c6d08> (a tigase.db.jdbc.DataRepositoryImpl)
        at tigase.db.jdbc.DataRepositoryImpl.getPreparedStatement(DataRepositoryImpl.java:202)
        at tigase.db.DataRepositoryPool.getPreparedStatement(DataRepositoryPool.java:171)
        at tigase.db.jdbc.TigaseCustomAuth.addUser(TigaseCustomAuth.java:283)
        at sun.reflect.GeneratedMethodAccessor84.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at tigase.stats.StatisticsInvocationHandler.invoke(StatisticsInvocationHandler.java:75)
        at com.sun.proxy.$Proxy39.addUser(Unknown Source)
        at tigase.db.AuthRepositoryMDImpl.addUser(AuthRepositoryMDImpl.java:55)
        at tigase.db.AuthRepository$addUser.call(Unknown Source)
        at tigase.rest.user.UserAdminHandler$_closure3.doCall(UserAdmin.groovy:92)
        at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101)
        at org.codehaus.groovy.runtime.metaclass.TransformMetaMethod.invoke(TransformMetaMethod.java:54)
        at groovy.lang.MetaClassImpl$3.invoke(MetaClassImpl.java:1257)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:263)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1041)
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:37)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:52)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127)
        at tigase.http.modules.rest.RestServlet.execute(RestServlet.groovy:299)
        at tigase.http.modules.rest.RestServlet$execute.callCurrent(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
        at tigase.http.modules.rest.RestServlet$execute.callCurrent(Unknown Source)
        at tigase.http.modules.rest.RestServlet.executeAsync(RestServlet.groovy:190)
        at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:351)
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:64)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:192)
        at tigase.http.modules.rest.RestServlet$_processRequest_closure3.doCall(RestServlet.groovy:160)
        at sun.reflect.GeneratedMethodAccessor131.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:263)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1041)
        at groovy.lang.Closure.call(Closure.java:405)
        at groovy.lang.Closure.call(Closure.java:421)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2296)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2281)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2322)
        at org.codehaus.groovy.runtime.dgm$186.invoke(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:244)
        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127)
        at tigase.http.modules.rest.RestServlet.processRequest(RestServlet.groovy:122)
        at tigase.http.modules.rest.RestExtServlet.processRequest(RestExtServlet.groovy:199)
        at tigase.http.modules.rest.RestExtServlet$processRequest$1.callCurrent(Unknown Source)
        at tigase.http.modules.rest.RestServlet.service(RestServlet.groovy:95)
woj-tek commented 3 years ago

Which distribution package do you use? Do you have any custom code/libraries? Which MySQL version do you use? Could you share your (obfuscated) configuration? Could you share complete threaddump?