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

Database takes like 15 seconds to load


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zhell
Member
Join Date: Oct 2016
Location: Sweden
Old 06-19-2017 , 15:41   Database takes like 15 seconds to load
Reply With Quote #1

I have a problem where the database takes really long time to load, which imo is pretty annoying and looks unprofessional, is there a way to improve this? It should have no problem load the database i dont have slow internet and im not hosting the database on a toaster so i don't see the problem, thanks in advance guys!
__________________
Community Servers: zhell.nu
Steam: zhell
Discord: zhell#7227

Contact me on Steam for inquiries
zhell is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 06-19-2017 , 16:18   Re: Database takes like 15 seconds to load
Reply With Quote #2

What database? Define "load".
klippy is offline
zhell
Member
Join Date: Oct 2016
Location: Sweden
Old 06-19-2017 , 16:34   Re: Database takes like 15 seconds to load
Reply With Quote #3

databases.cfg, everything in it takes long to load even if its from sqlite or mysql it takes long.

for example i have a timer on my server and the zones takes long to load
__________________
Community Servers: zhell.nu
Steam: zhell
Discord: zhell#7227

Contact me on Steam for inquiries

Last edited by zhell; 06-19-2017 at 16:35.
zhell is offline
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 06-19-2017 , 16:44   Re: Database takes like 15 seconds to load
Reply With Quote #4

This could depend on so many things...

Number of players
Efficiency of your timer
Available processing power/speed of where your databases are hosted
Optimization of queries
Number of plugins/servers accessing databases

If you're running cksurf for your timer, it is notorious for having terribly optimized queries, unoptimized (or nonexistent) indexes, etc.
__________________
sneaK is offline
zhell
Member
Join Date: Oct 2016
Location: Sweden
Old 06-19-2017 , 19:25   Re: Database takes like 15 seconds to load
Reply With Quote #5

Quote:
Originally Posted by sneaK View Post
This could depend on so many things...

Number of players
Efficiency of your timer
Available processing power/speed of where your databases are hosted
Optimization of queries
Number of plugins/servers accessing databases

If you're running cksurf for your timer, it is notorious for having terribly optimized queries, unoptimized (or nonexistent) indexes, etc.
Okay i guess it could be me having around 24 players online thats causing the problem thanks for the clear answer
__________________
Community Servers: zhell.nu
Steam: zhell
Discord: zhell#7227

Contact me on Steam for inquiries
zhell is offline
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 06-19-2017 , 19:32   Re: Database takes like 15 seconds to load
Reply With Quote #6

Quote:
Originally Posted by zhell View Post
Okay i guess it could be me having around 24 players online thats causing the problem thanks for the clear answer
Ideally number of players online at once shouldn't affect database queries significantly, I'm assuming the efficiency of the queries you are using is lacking.
__________________

Last edited by sneaK; 06-19-2017 at 19:32.
sneaK is offline
A_RM
AlliedModders Donor
Join Date: Oct 2016
Location: Canada
Old 06-20-2017 , 23:00   Re: Database takes like 15 seconds to load
Reply With Quote #7

This has been a growing issue for me as well recently. Been using ckSurf 1.19 on a server for about 2 months now and have never had issues with load zones/settings/records etc, they would all load instantly. I've noticed over the last ~2 weeks that it has become very slugish, taking ~15-20 seconds to load.

I'd have to assume this comes from the fact that as the server grows the more player times in the db that the plugin has to query.

Unfortunate
A_RM is offline
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 06-20-2017 , 23:05   Re: Database takes like 15 seconds to load
Reply With Quote #8

Pretty much. cksurf's database setup and queries are horrendously optimized, let alone the code for the timer itself. Poke through the cksurf thread if you're feeling motivated, there are some modified/improved queries scattered in there. I think there was also a script written up by someone to delete inactive users or players with 0 points which would help in this case.
__________________

Last edited by sneaK; 06-20-2017 at 23:06.
sneaK 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 22:58.


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