Page 1 of 1

Errors and a crashed server

Posted: Wed Nov 27, 2013 2:13 pm
by kornom
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number:6281
L2JDP Revision Number:1038

Woke up today, GS crashed..

Unclosed connection error:

Code: Select all

Unclosed connection! Trace: com.l2jserver.gameserver.SevenSignsFestival.saveFestivalData(SevenSignsFestival.java:1024)java.lang.RuntimeException        at com.l2jserver.L2DatabaseFactory.getConnection(L2DatabaseFactory.java:273)        at com.l2jserver.gameserver.SevenSignsFestival.saveFestivalData(SevenSignsFestival.java:1024)        at com.l2jserver.gameserver.taskmanager.tasks.TaskSevenSignsUpdate.onTimeElapsed(TaskSevenSignsUpdate.java:50)        at com.l2jserver.gameserver.taskmanager.TaskManager$ExecutedTask.run(TaskManager.java:107)        at com.l2jserver.gameserver.ThreadPoolManager$RunnableWrapper.run(ThreadPoolManager.java:93)        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)        at java.util.concurrent.FutureTask.runAndReset(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.runWorker(Unknown Source)        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)        at java.lang.Thread.run(Unknown Source)
Could anyone help?

Re: Errors and a crashed server

Posted: Fri Nov 29, 2013 12:18 am
by Hyrelius
From what I see this is not a real crash, but a RuntimeException, which states, that a connection was used in the SevenSignsFestival-class, but apparently failed to be closed (and returned to the connection pool) for whatever reason.

The error seems to have been caused by the actual saveFestivalData-method. There might be a variety of reasons why this happens. One might be, that there was no database at that very moment or the database became unavailable after statements have been issued and thus the connection was left opened - and got auto-closed by the L2DatabaseFactory.
Usually if it's hardware-related (e.g. out of memory), a corresponding Exception (OutOfMemoryException) would've been raised.

You could try to reproduce the error. I can't exactly remember, but I think it should be possible to manually issue the saving of the 7signs festival state. If the error can be reproduced (= it happens at the exact action all the time), this might be a bug.

Re: Errors and a crashed server

Posted: Fri Nov 29, 2013 3:25 am
by kornom
So connections do auto-close by L2DatabaseFactory?
Once my server crashed because "Limit of connections was reached" and it is set to 100 connections..
BTW after this seven signs error, the server crashed, I know it isnt suppose to but...

Re: Errors and a crashed server

Posted: Fri Nov 29, 2013 10:32 am
by Hyrelius
Were you able to reproduce the error? Do you have some custom scripts or something, that might cause such errors?

The connections do auto-close after a timeout (I think it was 30 seconds) and returned into connection pool. However: if you are writing e.g. your own script, it's a smart habbit to ensure a connection (and all variables, which depend on it) is closed (use try-catch-finally-construct).

I'm afraid that I cannot help you in this particular case though... but connections should normally be released when not needed for execution.