SOLVED:Can't login to extension/admin after some time

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Posts: 43
Joined: 04 Mar 2009, 12:55

SOLVED:Can't login to extension/admin after some time

Postby falcan » 13 Jul 2011, 15:49

Hi there, recently I've discussed a problem which I had and also solved it today, thanks to hints I've got here. In case you have the following symptoms:

1) Your extension stops accepting new logins, in the logs you only see Connection/Handshake and attemp to Login(but login thread doesn't capture the login)

2) You can't login to admin

3) After server restart all is fine for a while


4) You are using database connections in your login extension

And especially, if you have a low traffic server but still seeing this. The solution is simple - you are not closing the database connections properly. If you are working with connections like this:

connection = dbManager.getConnection();

You absolutely must make sure to close them at each exit point of your extension.


My mistake was, I didn't close the connection in case error was thrown (so it skipped my .close()). After few bad logins accumulated(exactly 10, because that was maximum threads set in my.ini), the login stopped working. For users still playing the game Database errors started to be logged(no wonder, the database went down). I have to point out I copied the extension code from somewhere around forums so pay attention to what you copy&paste :) The transition from ActionScript to Java&threads can be painful at times :P
Posts: 97
Joined: 27 Jan 2009, 21:34

Postby dingo » 28 Jan 2012, 17:16

thanks a lot for your hint, just found the missing "close" ;-)

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Aldenea, DavinVicy, DerikFent, JerodSa and 16 guests