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:
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
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