Shadowman321
Member
- Joined
- Mar 27, 2010
- Messages
- 205
- Reaction score
- 22
Hi.
I have some problems with my database.
It was working few days ago.
But today while I got back to work on server I have some problems with database and shit.
Main problem to fix is that, that server lost conection durning database optimization. Not always. But sometimes it just gives 2013 error.
And even if it works and succed to optimize every table, every optimization takes some time.
My server is hosted on debian-6.0.32bits vps.
Sql server: 5.5.38-0+wheezy1
I'm using this script for restart(global save shutdowns server):
This for database backup(cron task at 7:01 am):
And if I left everything after few days it wasn't possible to log in to game. So I tried to restart server and then what I saw was some problems with database.
Btw. Server has 3gb ram. But still... In ram graphs it shows like 700mb used...
max_allowed_packet was default by 64M. Changed it and few more numbers in config file for like 128M and 64M. It helped somehow. It was like 80% rate of failure, and now its like 30% fails. But still...
What is wrong? Maybe these scripts did something and it won't work anymore? But I've restarted vps so shuldn't it help?
In restart log I can see that server restarted everyday as I planned. And I have daily mysql backup. So I don't know where the problem is.
And question. Maybe I can disable db optimization and server will works fine? Is it needed?
I have some problems with my database.
It was working few days ago.
But today while I got back to work on server I have some problems with database and shit.
Main problem to fix is that, that server lost conection durning database optimization. Not always. But sometimes it just gives 2013 error.
And even if it works and succed to optimize every table, every optimization takes some time.
My server is hosted on debian-6.0.32bits vps.
Sql server: 5.5.38-0+wheezy1
I'm using this script for restart(global save shutdowns server):
Code:
#!/bin/bash
while true;
do
echo "Restart : `date +%d-%m-%Y--%H:%M`" >> ./restart.log
echo "Restart : `date +%d-%m-%Y--%H:%M`"
./tfs >> /zOTS/data/logs/console/console-log-`date +%d-%m-%Y--%H`.txt
sleep 120
done
This for database backup(cron task at 7:01 am):
Code:
#!/bin/sh
# MYSQL BACKUP SCRIPT
MYSQL_PASSWORD=xxxxxxx
umask 0077
# Backup the database
/usr/bin/mysqldump --password=$MYSQL_PASSWORD --all-databases > database-`date +%d-%m-%Y--%H`.sql
# Make the backup readable only by root
/bin/chmod 600 database-`date +%d-%m-%Y--%H`.sql
And if I left everything after few days it wasn't possible to log in to game. So I tried to restart server and then what I saw was some problems with database.
Btw. Server has 3gb ram. But still... In ram graphs it shows like 700mb used...
max_allowed_packet was default by 64M. Changed it and few more numbers in config file for like 128M and 64M. It helped somehow. It was like 80% rate of failure, and now its like 30% fails. But still...
What is wrong? Maybe these scripts did something and it won't work anymore? But I've restarted vps so shuldn't it help?
In restart log I can see that server restarted everyday as I planned. And I have daily mysql backup. So I don't know where the problem is.
And question. Maybe I can disable db optimization and server will works fine? Is it needed?