MySQL causing server to freeze
#1

I've switched from SQLite to MySQL, everything works so much faster and better. The server is randomly freezingthough, and either needs a restart or takes around 5-6 hours to start responding again.

At first it was only the queries that weren't threaded which were causing it to freeze. So I've threaded all of the queries, every single one. Now it randomly freezes, it can work perfectly for a few hours to a few days, then randomly freezes. The irc commands dont't respond, the ingame commands don't respond. Connecting to the server shows Connedted.. Loading game. Then nothing happens.

I've looked at every query, every piece of script and everything is fine as far as I'm aware. I've used mysql_free_result in the right places, I've threaded and multi threaded all of the queries.

The normal trigger is when more than one player connect to the server at the same time, although it doesn't always cause it to happen, I've noticed that it only seems to happen after two players join together.

I'm unable to provide any code right now because I'm not on my home computer where my gamemode is stored.

Is anyone familiar with this problem, or anyone know what the cause could be?

I'd really appriciate answers from those with a lot of experience using mysql.

Thanks
Reply
#2

Maybe hosting company.
Reply
#3

We would really need to see at least the register / login part of your script.
Reply
#4

I think i found the problem. It looks like it was being caused by mysql_ping(); I've removed that from the script and it works fine now.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)