Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [AlexJ] Links mod_perl cpanel MySQL- inconsistancy/unstable

Quote Reply
Re: [AlexJ] Links mod_perl cpanel MySQL- inconsistancy/unstable In reply to
Thanks for the tips guys....

After switching to a high end dedicated server, I still had the same issues... Cpanel was not the culpret.... I ended up hitting up the guys over on the official MySQL forums.

Someone over there suggested that I try locking the table during updates.... Problem solved....!! It's crazy it was such a simple resolution... Then again I've never written a MMORPG type game, where hundreds of actions can be happening every second....

Now... that said... Are there proper table lock and unlock features built into GT::SQL; ?

On the cron job that I fixed, I used DBI like so:
Code:

use DBI;
my $dbh = DBI->connect('dbi:mysql:tablename_community','username_comm','pw', {AutoCommit => 1} ) or die "Connection Error: $DBI::errstr\n";

# Put temporary lock on table
$dbh->do('LOCK TABLES glinks_gw_chars WRITE');

#
# Updates and queries
#

# Remove temporary lock on table
$dbh->do('UNLOCK TABLES');

Is there a more elegant way to do this with the GT::SQL library? At the very least I'd like to stick with the GT:SQL library and not load up DBI.... As the entire application is written around GT:SQL...

Thanks,

AlexJ
Subject Author Views Date
Thread Links mod_perl cpanel MySQL- inconsistancy/unstable AlexJ 5003 Jul 16, 2010, 8:19 AM
Post Re: [AlexJ] Links mod_perl cpanel MySQL- inconsistancy/unstable
Andy 4829 Jul 16, 2010, 9:52 AM
Post Re: [AlexJ] Links mod_perl cpanel MySQL- inconsistancy/unstable
brewt 4816 Jul 16, 2010, 2:18 PM
Post Re: [AlexJ] Links mod_perl cpanel MySQL- inconsistancy/unstable
AlexJ 4614 Oct 8, 2010, 10:33 AM
Post Re: [AlexJ] Links mod_perl cpanel MySQL- inconsistancy/unstable
AlexJ 4598 Oct 8, 2010, 5:51 PM