MySQL error: Connection timed out

fingon

Active member
Zend_Db_Adapter_Mysqli_Exception: Connection timed out - library/Zend/Db/Adapter/Mysqli.php:333
Generated By: Unknown Account, 41 minutes ago

Stack Trace
#0 /data/wwwroot/mysite.com/library/Zend/Db/Adapter/Abstract.php(315): Zend_Db_Adapter_Mysqli->_connect()
#1 /data/wwwroot/mysite.com/library/XenForo/Application.php(730): Zend_Db_Adapter_Abstract->getConnection()
#2 /data/wwwroot/mysite.com/library/XenForo/Application.php(973): XenForo_Application->loadDb(Object(Zend_Config))
#3 /data/wwwroot/mysite.com/library/XenForo/Application.php(1004): XenForo_Application->lazyLoad('db', NULL)
#4 /data/wwwroot/mysite.com/library/XenForo/Application.php(1635): XenForo_Application::get('db')
#5 /data/wwwroot/mysite.com/library/XenForo/Session.php(236): XenForo_Application::getDb()
#6 /data/wwwroot/mysite.com/library/XenForo/Session.php(323): XenForo_Session->__construct()
#7 /data/wwwroot/mysite.com/library/XenForo/Session.php(257): XenForo_Session::getPublicSession(Object(Zend_Controller_Request_Http))
#8 /data/wwwroot/mysite.com/library/XenForo/Controller.php(293): XenForo_Session::startPublicSession(Object(Zend_Controller_Request_Http))
#9 /data/wwwroot/mysite.com/library/XenForo/Controller.php(306): XenForo_Controller->_setupSession('Index')
#10 /data/wwwroot/mysite.com/library/XenForo/FrontController.php(350): XenForo_Controller->preDispatch('Index', 'XenForo_Control...')
#11 /data/wwwroot/mysite.com/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#12 /data/wwwroot/mysite.com/index.php(13): XenForo_FrontController->run()
#13 {main}

Request State
array(3) {
["url"] => string(48) "https://mysite.com/index.php?attachments/146418/"
["_GET"] => array(1) {
["attachments/146418/"] => string(0) ""
}
["_POST"] => array(0) {
}
}


This happens after I moved database to another server as I want to optimize loading speed.
Web server: 192.168.0.34
Data server: 192.168.0.35

here is my.cnf
[client]
port = 3306
socket = /tmp/mysql.sock
default-character-set = utf8mb4

[mysqld]
port = 3306
socket = /tmp/mysql.sock
performance_schema=ON

basedir = /usr/local/mariadb
datadir = /data/mariadb
pid-file = /data/mariadb/mysql.pid
user = mysql
bind-address = 0.0.0.0
server-id = 1

init-connect = 'SET NAMES utf8mb4'
character-set-server = utf8mb4

skip-name-resolve
#skip-networking
back_log = 300

max_connections = 5291
max_connect_errors = 6000
open_files_limit = 65535
table_open_cache = 1024
max_allowed_packet = 500M
binlog_cache_size = 1M
max_heap_table_size = 32M
tmp_table_size = 128M

read_buffer_size = 2M
read_rnd_buffer_size = 8M
sort_buffer_size = 8M
join_buffer_size = 8M
key_buffer_size = 256M

thread_cache_size = 64

query_cache_type = 1
query_cache_size = 64M
query_cache_limit = 2M

ft_min_word_len = 4

#binlog_format = mixed
expire_logs_days = 7

log_error = /data/mariadb/mysql-error.log
slow_query_log = 1
long_query_time = 1
slow_query_log_file = /data/mariadb/mysql-slow.log

performance_schema = 0

#lower_case_table_names = 1

skip-external-locking

default_storage_engine = InnoDB
innodb_file_per_table = 1
innodb_open_files = 500
innodb_buffer_pool_size = 8G
innodb_write_io_threads = 4
innodb_read_io_threads = 4
innodb_thread_concurrency = 16
innodb_purge_threads = 1
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 8M
innodb_log_file_size = 1024M
innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120
innodb_buffer_pool_instances = 8

bulk_insert_buffer_size = 32M
myisam_sort_buffer_size = 64M
myisam_max_sort_file_size = 10G
myisam_repair_threads = 1

interactive_timeout = 28800
wait_timeout = 28800

[mysqldump]
quick
max_allowed_packet = 32M

[myisamchk]
key_buffer_size = 256M
sort_buffer_size = 8M
read_buffer = 4M
write_buffer = 4M

#ADDED
transaction_isolation = READ-COMMITTED
innodb_file_io_threads = 4
thread_stack = 512K
innodb_additional_mem_pool_size = 64M


Any ideas? thanks
 
.user.ini create ftp upload

C++:
memory_limit = 10000M;
max_execution_time = 180;
upload_max_filesize = 10000M;
post_max_size = 10000M;
 
This has nothing to do with PHP or php.ini settings.

This is either a networking/firewall issue or a configuration issue with MySQL (such as over what IPs it's listening on). This is likely to be something that a sysadmin would have to help with.
 
This has nothing to do with PHP or php.ini settings.

This is either a networking/firewall issue or a configuration issue with MySQL (such as over what IPs it's listening on). This is likely to be something that a sysadmin would have to help with.

thanks , I'll try to solve this issue.
 
Back
Top Bottom