Raised This Month: $51 Target: $400
 12% 

A lot of ongoing SQL connections cause problems


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TheFlyingApple
Member
Join Date: Aug 2016
Old 12-13-2020 , 09:46   A lot of ongoing SQL connections cause problems
Reply With Quote #1

Hi,

I run 17 CS:GO servers - all with mostly the same plugins. We have 8 plugins that require DB connections and we have counted to a total of (max) 15 connections to our database per server (Just when i boots up).. This would give us a total of 255 connections at the very MAX.

However, our SQL server keep reaching its "max_connections" limit - which is 500. How is this possible? How does Sourcemod handle closure of SQL connection, when the query is done? Is it automatic or something the plugins must contains (Maybe badly coded plugins?)

Also, if we increase the number of "max_connections" all of Sourcemod late loads on our servers... It feels like it is stuck in the first 60-120 seconds before everything loads simultaneously.. Maybe a SQL connections that stops the entire Sourcemod process? The Rankme plugin also bugs, giving random people each other stats and ranks... Maybe because of this late loading?

The plugins are:
- Sourcebans++ (https://sbpp.dev/)
- WS (https://forums.alliedmods.net/showthread.php?t=298770)
- Level Ranks (https://forums.alliedmods.net/showthread.php?t=318782)
- Kento RankMe (https://forums.alliedmods.net/showthread.php?p=2467665)
- Adminwatch (https://forums.alliedmods.net/showthread.php?p=1965353)
- Zeph Store (https://forums.alliedmods.net/showthread.php?t=276677)
+ 2 private plugins which I can't show

Hope someone can give me some answers
TheFlyingApple is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-19-2020 , 14:12   Re: A lot of ongoing SQL connections cause problems
Reply With Quote #2

Connections are managed by individual plugins - for most you should expect the database connection to be open for the entirety of the time the plugin is loaded. A large number of connections is not really a problem, but I would not have expected more than one database connection per plugin for most plugins - you should investigate with `SHOW FULL PROCESSLIST` and similar commands on the MySQL side to see what the connections are being used for. I'd advise using a unique user account for each server/plugin to ease identification and troubleshooting.

SourceMod has fairly aggressive limits on SQL query processing and the queue is shared among all plugins on a server (in order to avoid impacting gameplay performance), but there should be no change in behaviour depending on the connection limit - unless you've got a particularly heavy plugin failing to execute queries with the lower limit, your SourceMod error logs should give some indication around that, or the higher limit is overloading your MySQL server in some other way.
__________________
asherkin is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode