Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

database error #164

Open
born2hate opened this issue Feb 17, 2018 · 5 comments
Open

database error #164

born2hate opened this issue Feb 17, 2018 · 5 comments

Comments

@born2hate
Copy link

hi there! get randomly error, changed already 2 servers, now i have 16gb 8 cpus:

PHP Warning: Error while sending QUERY packet. PID=27217 in /home/admin/web/mydomain.com/public_html/letsplay/lib/mysql.php on line 160
PHP Fatal error: Uncaught Exception: database insertion error: MySQL server has gone away in /home/admin/web/mydomain.com/public_html/letsplay/bot/Database.php:137
Stack trace:
#0 /home/admin/web/mydomain.com/public_html/letsplay/bot/utils.php(44): Database::log('Error during ma...')
#1 /home/admin/web/mydomain.com/public_html/letsplay/bot/Arbitrator.php(593): logg('Error during ma...')
#2 /home/admin/web/mydomain.com/public_html/letsplay/bot/Arbitrator.php(22): Arbitrator->innerRun()
#3 [internal function]: Arbitrator->{closure}(Object(React\EventLoop\Timer\Timer))
#4 /home/admin/web/mydomain.com/public_html/letsplay/lib/composer/vendor/react/event-loop/src/Timer/Timers.php(90): call_user_func(Object(Closure), Object(React\EventLoop\Timer\Timer))
#5 /home/admin/web/mydomain.com/public_html/letsplay/lib/composer/vendor/react/event-loop/src/StreamSelectLoop.php(177): React\EventLoop\Timer\Timers->tick()
#6 /home/admin/web/mydomain.com/public_html/letsplay/bot/Arbitrator.php(583): React\EventLoop\StreamSelectLoop->run()
#7 /hom in /home/admin/web/mydomain.com/public_html/letsplay/bot/Database.php on line 137
root@cryptogod:/home/admin/web/mydomain.com/public_html/letsplay#

whats wrong?

@born2hate
Copy link
Author

solved, problem was in mysql timeout config

@Greatguy2
Copy link

how did you solved it?

@born2hate
Copy link
Author

increased wait_timeout and interactive_timeout parametrs:

[client]
port=3306
socket=/var/run/mysqld/mysqld.sock

[mysqld_safe]
socket=/var/run/mysqld/mysqld.sock

[mysqld]
user=mysql
pid-file=/var/run/mysqld/mysqld.pid
socket=/var/run/mysqld/mysqld.sock
port=3306
basedir=/usr
datadir=/var/lib/mysql
tmpdir=/tmp
lc-messages-dir=/usr/share/mysql
log_error=/var/log/mysql/error.log

symbolic-links=0

skip-external-locking
key_buffer_size = 1024M
max_allowed_packet = 10096M
table_open_cache = 256
sort_buffer_size = 20M
read_buffer_size = 20M
read_rnd_buffer_size = 32M
myisam_sort_buffer_size = 256M
thread_cache_size = 512
query_cache_size= 1024M

#innodb_use_native_aio = 0
innodb_file_per_table

max_connections=200
max_user_connections=50
wait_timeout=1000
interactive_timeout=5000
long_query_time=500

!includedir /etc/mysql/conf.d/

@Greatguy2
Copy link

Nope didnt helped me. still getting the same error.

@born2hate
Copy link
Author

again stuck at this problem, helped: https://tools.percona.com/wizard
try to create config for you server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants