Page 1 of 2

Freezes and disconnecting random clients

Posted: Sat Nov 06, 2010 8:29 pm
by DaTaGR
If you want to receive support we need this info to help you properly.
ยป Find Revision
L2J Revision 4422M:
L2JDP Revision 7669M:

Screen from GS window :

Image

I put the debug log from telnet in attachment.

Yes I know I have put the threadpool to 14...I was testing to find a way to fix it.
I did try with various thread pool sizes but no luck.
I also noticed that when this freeze happens the QueudTasks in the Packets becomes 200+.
I type //stats and I have some seconds to see this but after it returns back to 0.
I do have some custom scripts but I checked them all for unclosed connections.I had some left open but after searching here I manage to find solution on that.I fixed all the unclosed connections but the problem is still there.
Also I increased the slots on MySQL to 1000. Also I edit the gameserver.bat values to higher so I will have enough memory for the java...well I am out of ideas. :(


Anyone can give me help please on that?

Re: Freezes and disconnecting random clients

Posted: Sat Nov 06, 2010 8:42 pm
by Naonah
MaximumDbConnections = ?

Re: Freezes and disconnecting random clients

Posted: Sat Nov 06, 2010 8:44 pm
by DaTaGR
Naonah wrote:MaximumDbConnections = ?

1000 I have already stated it in MySQL

Re: Freezes and disconnecting random clients

Posted: Sat Nov 06, 2010 8:46 pm
by DaTaGR
I have seen your post about a similar situation by the way.
What did you do to fix it? :)

Re: Freezes and disconnecting random clients

Posted: Sat Nov 06, 2010 9:43 pm
by Naonah
I am not talking about mysql

Re: Freezes and disconnecting random clients

Posted: Sat Nov 06, 2010 10:59 pm
by _DS_
Nothing interesting in debug log.

Re: Freezes and disconnecting random clients

Posted: Sun Nov 07, 2010 12:32 am
by DaTaGR
Naonah wrote:I am not talking about mysql
I set it to 1000 now at loginserver.properties
Do you think that was the problem?
_DS_ wrote:Nothing interesting in debug log.
The 14 value on the packet thread pool size could cause something unwanted?
Also the QueuedTasks in the //stats that are increasing dramatically is what causing the freeze.
How can I avoid this increasing? I thought if I would increase the thread pool size would fix it...but no luck on that.
Any tips?

Re: Freezes and disconnecting random clients

Posted: Sun Nov 07, 2010 1:27 am
by _DS_
Relatively big number of queued tasks is normal, active - no.
Check your custom code by removing it.

Re: Freezes and disconnecting random clients

Posted: Sun Nov 07, 2010 1:36 am
by DaTaGR
I did check the custom scripts for unclosed connections.
I noticed that the offline trader is causing some errors.
Here are the errors on GS:


Nov 7, 2010 3:26:43 AM com.l2jserver.L2DatabaseFactory$ConnectionCloser run
WARNING: Unclosed connection! Trace: com.l2jserver.gameserver.model.itemcontainer.Inventory.restore(Inventory.java:1617)
java.lang.RuntimeException
at com.l2jserver.L2DatabaseFactory.getConnection(L2DatabaseFactory.java:227)
at com.l2jserver.gameserver.model.itemcontainer.Inventory.restore(Inventory.java:1617)
at com.l2jserver.gameserver.model.itemcontainer.PcInventory.restore(PcInventory.java:661)
at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.<init>(L2PcInstance.java:1247)
at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.restore(L2PcInstance.java:7265)
at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.load(L2PcInstance.java:1201)
at com.l2jserver.gameserver.network.L2GameClient.loadCharFromDisk(L2GameClient.java:563)
at com.l2jserver.gameserver.network.clientpackets.CharacterSelect.runImpl(CharacterSelect.java:103)
at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:62)
at com.l2jserver.gameserver.network.L2GameClient.run(L2GameClient.java:997)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Nov 7, 2010 3:26:43 AM com.l2jserver.L2DatabaseFactory$ConnectionCloser run
WARNING: Unclosed connection! Trace: com.l2jserver.gameserver.model.actor.instance.L2PcInstance.restore(L2PcInstance.java:7248)
java.lang.RuntimeException
at com.l2jserver.L2DatabaseFactory.getConnection(L2DatabaseFactory.java:227)
at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.restore(L2PcInstance.java:7248)
at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.load(L2PcInstance.java:1201)
at com.l2jserver.gameserver.network.L2GameClient.loadCharFromDisk(L2GameClient.java:563)
at com.l2jserver.gameserver.network.clientpackets.CharacterSelect.runImpl(CharacterSelect.java:103)
at com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:62)
at com.l2jserver.gameserver.network.L2GameClient.run(L2GameClient.java:997)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Nov 7, 2010 3:26:57 AM com.l2jserver.gameserver.model.actor.instance.L2PcInstance transformInsertInfo
SEVERE: Transformation insert info:
java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.InterruptedException
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:62)
at com.mchange.v2.c3p0.stmt.GooGooStatementCache.acquireStatement(GooGooStatementCache.java:571)
at com.mchange.v2.c3p0.stmt.GooGooStatementCache.checkoutStatement(GooGooStatementCache.java:192)
at com.mchange.v2.c3p0.impl.NewPooledConnection.checkoutStatement(NewPooledConnection.java:288)
at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:199)
at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.transformInsertInfo(L2PcInstance.java:5084)
at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.store(L2PcInstance.java:7746)
at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.store(L2PcInstance.java:7756)
at com.l2jserver.gameserver.network.L2GameClient.saveCharToDisk(L2GameClient.java:359)
at com.l2jserver.gameserver.network.L2GameClient$AutoSaveTask.run(L2GameClient.java:827)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:485)
at com.mchange.v2.c3p0.stmt.GooGooStatementCache.acquireStatement(GooGooStatementCache.java:561)
... 17 more
Nov 7, 2010 3:26:59 AM com.l2jserver.gameserver.model.actor.instance.L2PcInstance transformInsertInfo
SEVERE: Transformation insert info:
java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.InterruptedException
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:62)
at com.mchange.v2.c3p0.stmt.GooGooStatementCache.acquireStatement(GooGooStatementCache.java:571)
at com.mchange.v2.c3p0.stmt.GooGooStatementCache.checkoutStatement(GooGooStatementCache.java:192)
at com.mchange.v2.c3p0.impl.NewPooledConnection.checkoutStatement(NewPooledConnection.java:288)
at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:199)
at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.transformInsertInfo(L2PcInstance.java:5084)
at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.store(L2PcInstance.java:7746)
at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.store(L2PcInstance.java:7756)
at com.l2jserver.gameserver.model.actor.instance.L2PcInstance.deleteMe(L2PcInstance.java:11735)
at com.l2jserver.gameserver.network.L2GameClient$CleanupTask.run(L2GameClient.java:801)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:485)
at com.mchange.v2.c3p0.stmt.GooGooStatementCache.acquireStatement(GooGooStatementCache.java:561)
... 16 more

How do I know that is caused from offline trader script?
Because when I disable it doesn't appear those errors after restarting the server and first players enter.

Re: Freezes and disconnecting random clients

Posted: Sun Nov 07, 2010 2:28 am
by _DS_
mysql server overloaded

Re: Freezes and disconnecting random clients

Posted: Sun Nov 07, 2010 10:39 am
by DaTaGR
Could this be a flood attack or just a bad codded script?
Is there something I can do to avoid this incident?
Thanks for the attention!

Re: Freezes and disconnecting random clients

Posted: Sun Nov 07, 2010 11:22 am
by Naonah
DaTaGR wrote:Could this be a flood attack or just a bad codded script?
Is there something I can do to avoid this incident?
Thanks for the attention!
omg, what a flood attack? :mrgreen: , just close these damn connections and all will be OK

Re: Freezes and disconnecting random clients

Posted: Sun Nov 07, 2010 1:10 pm
by DaTaGR
But those unclosed connections are in the l2j default java code.
I haven't touched them at all.Check this :
WARNING: Unclosed connection! Trace: com.l2jserver.gameserver.model.itemcontainer.Inventory.restore(Inventory.java:1617)
java.lang.RuntimeException
It is not my script this one.

Re: Freezes and disconnecting random clients

Posted: Sun Nov 07, 2010 1:19 pm
by Naonah
DaTaGR wrote:But those unclosed connections are in the l2j default java code.
I haven't touched them at all.Check this :
WARNING: Unclosed connection! Trace: com.l2jserver.gameserver.model.itemcontainer.Inventory.restore(Inventory.java:1617)
java.lang.RuntimeException
It is not my script this one.
sry, you are wrong, these unclosed cons are not from core

Re: Freezes and disconnecting random clients

Posted: Sun Nov 07, 2010 3:46 pm
by DaTaGR
I can't find the script that is causing this unclosed connection in the error.log
It should be there.If I am wrong please correct me.