SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

Thread Tools Display Modes
Old 15/08/2011, 11:41 AM   #1
Big Clucker
Join Date: Nov 2010
Posts: 65
Reputation: 8
Default MySQL causing server to freeze

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.

_Outbreak_ is offline  
Old 15/08/2011, 11:45 AM   #2
Darnell's Avatar
Join Date: Jul 2010
Posts: 824
Reputation: 35
Default Re: MySQL causing server to freeze

Maybe hosting company.
Darnell is offline  
Old 15/08/2011, 12:01 PM   #3
Join Date: Mar 2008
Location: New Zealand
Posts: 2,630
Reputation: 410
Default Re: MySQL causing server to freeze

We would really need to see at least the register / login part of your script.
[HiC]TheKiller is offline  
Old 21/08/2011, 06:14 PM   #4
Big Clucker
Join Date: Nov 2010
Posts: 65
Reputation: 8
Default Re: MySQL causing server to freeze

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.
_Outbreak_ is offline  

Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
R5 Server update causing problem Famalamalam Help Archive 3 05/08/2011 04:09 AM
[Help] YSI causing my server to stop responding black_dota Help Archive 4 17/05/2011 08:33 AM
[Solved] Function causing server freeze Rimeau Help Archive 0 05/01/2010 08:32 PM
Spamming OnPlayerDeath causing the server to crash? Danny_Costelo Server Support 11 27/09/2009 10:17 AM

All times are GMT. The time now is 10:16 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.