MySQL slows down after server restart
#1

I'm loading 86 houses from a MySQL table. Exterior xyz, interior xyz, interior id, price, owner's name. It's been this way for years since I first coded it, and it's never had any problems. Loads the data into an enumerator, creates the pickups and 3d text labels, and then it's done. I haven't changed any of the code or changed the database in any way since probably last year.

When I first start the server, it takes around 1.5-2.5 seconds to load the houses. However, if I use /rcon gmx, or my /restart command (which saves player data first, then runs the gmx command), the houses start loading but take around 45 seconds to finish loading, and during this period, nothing else that uses MySQL works, for example user accounts won't load so the player will just be stuck trying to spawn but being unable to because they aren't logged in. Then, when the houses load, everything starts working perfectly.

I also noticed that if I close the server .exe while the houses are taking ages to load then boot it again, it still takes ages unless I wait for around 45 seconds before rebooting.

This has never happened before until about a week ago when I decided to boot up the server for old times. Any ideas?
Reply
#2

Probably has something to do with not clearing the MySQL cache...you said this was an old gamemode, is it old enough that it isn't using threaded queries?
Reply
#3

Quote:
Originally Posted by dicknyson
Посмотреть сообщение
When I first start the server, it takes around 1.5-2.5 seconds to load the houses.
That already seems way too long for that little amount of rows.

Do you properly close the connection on exit?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)