ChangeSkinX

ChangeSkinX

446k Downloads

Too many connections

TKwSni opened this issue ยท 11 comments

commented

I found this today after updating changeskin from a really old version to the newest available.

http://pastebin.com/dDabBMWm

I noticed After some players didnt have their skin.

commented

Looks like a connection leak.

commented

Only after you use ChangeSkin or with just FastLogin too.

commented

Or it was the problem I fixed with the last commit.

commented

@Blackyvk Could you ask your hoster if it was a resource leak or just a connection leak where too many connections are open.

commented

Well i dont know, i'm afraid to try again because It caused so many problems... It all started once, after I reached 25 players few weeks ago, people started to get timed out, we disabled many sql plugins and it stabilized then yesterday I installed the new version of change skin (without the new commit) and I reported this issue, then after all the trouble ended I compiled today using the last commit and using sqlite, I got timed on both premium and cracked account, i'm not too sure what caused but the session check error was from fastlogin 1.3, I still havent updated to the lastest version because it a very essential plugin and I must be sure its working fine. i'll see if i can find the error in the logs, i had to restart so many times because of this.

I asked my host i'll wait for a reply and see If he can find out.

commented

Sorry for all this trouble it caused.

commented

I had so many problems yesterday in my server, I dont really know if this was the sour ce of the problem....

I thought, i'll change mysql for sqlite then, to avoid this problem... then compiled your lastest commit and installed.

I installed the plugin, started server gave a skin to my alt account, and I got timed out because fastlogin 1.3 (old version) couldnt check my session, and i was logged in, and then my alt which is a cracked account got timed out too. I decided to go back to change skin 1.3.1 and everything seems to work fine again.

I dont know if those plugins are the problem... but how can I help you to help me ?

(I have a new host without mojang rate limit bug)

commented

Can you check what's the connection limit is to your MySQL database? I think FastLogin is the problem, because FastLogin keeps a number of collections alive in order to reuse them.

commented

well i cannot check but my host provider told me i was far behind the limit, he had to restart the mysql server after that.... my server isnt very populated from 10 to 25 players normally.

commented

Dont worry, instead let me thank you for all this great support you provide.

The Host replied me with "I checked last time and there were under 40 connections to MySQL, which is way under the limit. " he and also offered to change the machine but i doubt i that will solve the problem...

Do you think the newer version of fastlogin can solve the problem ? do you think its viable to use sqlite for this since many accounts might get the file too big ?... do you think it can be a problem with authme 3.4... i'm still afraid of other auth plugins every other seems to be unstable aswell...

commented

I know that FastLogin uses 10 connections every time. As I said earlier in order to reuse the connection instead of establishing a new connection each time. So to keep the overhead of handshaking (during establishing) very low. -> Keep-alive connection

AuthMe 5.X uses the same library as FastLogin with the same settings (10 connections always)
AuthMe 3.X uses up to 20 connections, but is not fixed to that size. So it resizes from 0 to 20 dynamically when more is needed. So I don't think this is a real problem here, because it would use much on your server.

=> 10 + 5 = 15 connections
Maybe there are other plugins which will run queries too or uses connection pooling.

I could force FastLogin too use less connections if you want to.