Jump to content
  • 0

Ubuntu Mysql Too Many Connections after launching gameserver


Question

Posted

Hi there,

 

My problem is: I can connect remotely to the database (using navicat) when the gameserver isn't running.

However after I launch the gameserver on my server machine and I try to connect remotely to the database I get the Too Many Connections error.

After I kill the gameserver I'm still unable to connect to the DB until i restart mysql.

 

And the same thing happens if I simply quit navicat while I'm logged in the DB without closing the connection first.

 

Does anyone have any ideas what may be the issue?

 

 

Recommended Posts

  • 0
Posted (edited)

Meanwhile I realised that I had the max DB connection set to 40 in the server,properties and I had to set a value bigger than 40 in the mysql's .cnf file.

 

And now it seems to be working.

 

Does that mean that the amount of connections I set in the server.properties is automatically reserved on server startup?

 

Also, I would like to ask you guys: What would be the optimal DB connection amount for  (lets say 400-500 players) in server.properties / and in the mysql config.

 

Thanks in advance.

Edited by Horse
  • 0
Posted

1.Another Linux Ubuntu wannabe user :P

2. Still using Navicat FFS! Have you heard about HeidiSQL?

3. At for MySQL just keep the default 50 db connections otherwise with 200, 400 or even more you'll have big problems :))

..there is a reason in that keeping the "default" values. 

4. GL & HF! ;)

  • 0
Posted
2 hours ago, Irelia#1 said:

2. Still using Navicat FFS! Have you heard about HeidiSQL?

 

Navicat is actually very proper.

 

 

  • 0
Posted

did you connect your website in your database? :D

if yes imagine a ddos attack in your site what damage can do in your game server, well something like that :)

  • 0
Posted (edited)
17 hours ago, Irelia#1 said:

1.Another Linux Ubuntu wannabe user :P

2. Still using Navicat FFS! Have you heard about HeidiSQL?

3. At for MySQL just keep the default 50 db connections otherwise with 200, 400 or even more you'll have big problems :))

..there is a reason in that keeping the "default" values. 

4. GL & HF! ;)

 My mistake, i meant to write 40 not 400. The default value was 100 which I actually lowered.

 

Although as far as i understand even that value is higher than it actually should be. Since it shouldn't be higher than core numbers * 2 + effective spindles.

 

And yet After browsing through many source files of other projects i see the following:  MaxDbConnections on L2j : 100, Mobius: 500, Tales:999 and so on all higher than 100 or even above 500. So, yea it left me perplexed.

And that is why I am asking if there's an optimal value, or I'm missing something and there's a reason these projects have very high dbconnection values.

 

As for HeidiSQL I used it before switching  to  Navicat Premium which seems far better in my humble opinion, but each to its own, i guess.

 

 

As for your sarcasm, I doubt any of us are given birth as Linux experts. I barely used linux before, so yea, obviously I ask to better understand it.

 

14 hours ago, Nightw0lf said:

did you connect your website in your database? :D

if yes imagine a ddos attack in your site what damage can do in your game server, well something like that :)

Naturally, I 'm not planning to expose my DB to that, so no.

 

 

 

Edited by Horse
  • 0
Posted

Let me get this, so you "touch" the values without having backup now asking for help?

each project has its own customs inside (for me the more connections they use the worse they are)

 

just for you to know the obvious reason is the server as a cause

and the solution is

1) make bigger the pool

2) reduse server's pool

 

if you dont get that until now do a fresh install in your OS and start over (it helps).

  • 0
Posted
26 minutes ago, Nightw0lf said:

Let me get this, so you "touch" the values without having backup now asking for help?

each project has its own customs inside (for me the more connections they use the worse they are)

 

just for you to know the obvious reason is the server as a cause

and the solution is

1) make bigger the pool

2) reduse server's pool

 

if you dont get that until now do a fresh install in your OS and start over (it helps).

 

It's a bit hard to understand what you are trying to say, but I take it you assume i'm talking about a live server while I'm not.

Therefore, talking about backup at this point seems irrelevant.

Regardless of defualt or non-default values, the problem is that I had to set the number of connections higher in the mysql settings compared to the servers settings in order to be able to connect to the DB remotely through navicat.

And I simply wish to properly understand why is that, and why many projects have such high maxdbconnection values while in theory it wouldn't be needed, that's all.

 

  • 0
Posted
1 hour ago, Nightw0lf said:

just go with l2off maybe java is not for you then

No offense, but it seems you don't even understand what I'm asking, so I'd appreciate if you didn't post random,totally irrelevant suggestions out of the blue, if you can't answer my quiestion.

  • 0
Posted
2 hours ago, Horse said:

Regardless of defualt or non-default values, the problem is that I had to set the number of connections higher in the mysql settings compared to the servers settings in order to be able to connect to the DB remotely through navicat. 

And I simply wish to properly understand why is that, and why many projects have such high maxdbconnection values while in theory it wouldn't be needed, that's all. 

you ask why projects need to many connections, if you cant handle that fact or work with it i gave you the solution, if you want to know why project creators did that or why ask them they are about 50-60 years old fellows now, hard to find them on the internet, but oh wait i answered that when i told you,

3 hours ago, Nightw0lf said:

each project has its own customs inside (for me the more connections they use the worse they are)

implying custom as custom code that uses database inserts/updates/deletes that count as a connection to database capish?

  • 0
Posted
3 minutes ago, Nightw0lf said:

you ask why projects need to many connections, if you cant handle that fact or work with it i gave you the solution, if you want to know why project creators did that or why ask them they are about 50-60 years old fellows now, hard to find them on the internet, but oh wait i answered that when i told you,

 

 50 -60 years old fellows? the hell are you talking about? Clearly not about l2j projects. I think you have some serious misunderstandings here.

 

8 minutes ago, Nightw0lf said:

 

implying custom as custom code that uses database inserts/updates/deletes that count as a connection to database capish?

Thanks for stating the obvious...then again... it has hardly anything to do with my question ..lol.

  • 0
Posted

ok i give up you cant even understand your problem at least check google, how mysql works, what keep alive connection is, how long it stays alive and specially if you KILL your server without proper close in order to close that connection pool.

  • 0
Posted (edited)
54 minutes ago, Nightw0lf said:

ok i give up you cant even understand your problem at least check google, how mysql works, what keep alive connection is, how long it stays alive and specially if you KILL your server without proper close in order to close that connection pool.

The first thing that actually made some sense. Yes, one time I hadn't properly shut down theserver, and the connections were not properly closed.

 

 

Ofc my main question still stands, why do I need more mysql connections than server side maxdbconnections value.

 

The reason I am asking this is because I have never encountered such a problem when I was using windows or windows server.

Edited by Horse

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • From Salvation onwards I think you need a patched nwindow.dll that allows such modifications, try to see if you get what you need here: https://drive.google.com/drive/u/1/folders/1LLbQFGf8KlR-O0Iv5umfF-pwZgrDh9bd
    • hello everyone! I am wanting to save the files (Ini. - Data - ) of the EP5 Client: Salvation... But they generate the error "corrupt files"... I tried several versions of L2FileEditor without good results. I need help! Thank you!
    • Opening December 6th at 19:00 (GMT +3)! Open Beta Test from November 30th!   https://l2soe.com/   🌟 Introducing L2 Saga of Eternia: A Revolution in Lineage 2 High Five! 🌟   Dear Lineage 2 enthusiasts, Prepare to witness the future of private servers! L2 Saga of Eternia is not just another High Five project—it’s a game-changing experience designed to compete with the giants of the Lineage 2 private server scene. Built for the community, by the community, we’re here to raise the bar in quality, innovation, and longevity. What Sets Us Apart? 💎 No Wipes, Ever Say goodbye to the fear of losing your progress. Our server is built to last and will never close. Stability and consistency are our promises to you. ⚔️ Weekly New Content Our dedicated development team ensures fresh challenges, events, and updates every week. From custom quests to exclusive features, there will always be something exciting to explore. 💰 No Pay-to-Win Skill and strategy matter most here. Enjoy a balanced gameplay environment where your achievements come from effort, not your wallet. 🌍 A Massive Community With 2000+ players expected, join a vibrant and active community of like-minded adventurers ready to conquer the world of Aden. 🏆 Fair and Competitive Gameplay Our systems are designed to promote healthy competition while avoiding abusive mechanics and exploits. 🔧 Professional Development From advanced bug fixes to carefully curated content, we pride ourselves on smooth performance, no lag, and unparalleled server quality. Key Features Chronicle: High Five with unique interface Rate: Dynamic x10 rates Class Balance: Carefully fine-tuned for a fair experience PvP Focused: PvP Ranking & aura display effect for 3 Top PvPers every week Custom Events: Seasonal and permanent events to keep you engaged Additional Features:   Custom Endgame Content: Introduce unique dungeons, raids, or zones unavailable in other servers. Player-Driven Economy: Implement a strong market system and avoid overinflated drops or rewards. Epic Siege Battles: Announce special large-scale sieges and PvP events. Incentives for Streamers and Clans: Attract influencers and big clans to boost server publicity. Roadmap Transparency: Share a public roadmap of planned updates to build trust and excitemen   Here you can read all the features: https://l2soe.com/features   Video preview: Join the Revolution! This is your chance to be part of something legendary. L2 Saga of Eternia is not just a server; it’s a movement to redefine what Lineage 2 can be. Whether you’re a seasoned veteran or a newcomer to the world of Aden, we invite you to experience Lineage 2 at its finest.   Official Launch Date: December 6th 2024 Website: https://l2soe.com/ Facebook: https://www.facebook.com/l2soe Discord: https://discord.com/invite/l2eternia   Let’s build the ultimate Lineage 2 experience together. See you in-game! 🎮
    • That's like a tutorial on how to run l2 on MacOS Xd but good job for the investigation. 
  • Topics

×
×
  • Create New...