Database connection issue
Hello,
We are using WHM/Cpanel on centos 7.6.
total ram = 2GB
We are facing some issue with MySQL database.
In a day, database 4 to 5 times lost the connection and our websites are stop working.
When I restart, MySQL service then works perfectly.
So, please tell me what the problem with my MySQL database and config file and please help me to solve this.
ERROR log...
190508 16:23:18 mysqld_safe mysqld from pid file /var/lib/mysql/host.domain.com.pid ended
190508 16:23:18 mysqld_safe Logging to '/var/lib/mysql/host.domain.com.err'.
190508 16:23:18 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2019-05-08 16:23:18 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-05-08 16:23:18 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2019-05-08 16:23:18 0 [Note] /usr/sbin/mysqld (mysqld 5.6.43) starting as process 21093 ...
2019-05-08 16:23:18 21093 [Note] Plugin 'FEDERATED' is disabled.
2019-05-08 16:23:18 21093 [Note] InnoDB: Using atomics to ref count buffer pool pages
2019-05-08 16:23:18 21093 [Note] InnoDB: The InnoDB memory heap is disabled
2019-05-08 16:23:18 21093 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-05-08 16:23:18 21093 [Note] InnoDB: Memory barrier is not used
2019-05-08 16:23:18 21093 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-05-08 16:23:18 21093 [Note] InnoDB: Using Linux native AIO
2019-05-08 16:23:18 21093 [Note] InnoDB: Using CPU crc32 instructions
2019-05-08 16:23:18 21093 [Note] InnoDB: Initializing buffer pool, size = 1.5G
2019-05-08 16:23:18 21093 [Note] InnoDB: Completed initialization of buffer pool
2019-05-08 16:23:18 21093 [Note] InnoDB: Highest supported file format is Barracuda.
2019-05-08 16:23:19 21093 [Note] InnoDB: 128 rollback segment(s) are active.
2019-05-08 16:23:19 21093 [Note] InnoDB: Waiting for purge to start
2019-05-08 16:23:19 21093 [Note] InnoDB: 5.6.43 started; log sequence number 14038304572
2019-05-08 16:23:19 21093 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
2019-05-08 16:23:19 21093 [Note] - '127.0.0.1' resolves to '127.0.0.1';
2019-05-08 16:23:19 21093 [Note] Server socket created on IP: '127.0.0.1'.
2019-05-08 16:23:19 21093 [Note] Event Scheduler: Loaded 0 events
2019-05-08 16:23:19 21093 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.6.43' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
2019-05-08 16:25:02 21093 [Note] /usr/sbin/mysqld: Normal shutdown
2019-05-08 16:25:02 21093 [Note] Giving 0 client threads a chance to die gracefully
2019-05-08 16:25:02 21093 [Note] Event Scheduler: Purging the queue. 0 events
2019-05-08 16:25:02 21093 [Note] Shutting down slave threads
2019-05-08 16:25:02 21093 [Note] Forcefully disconnecting 0 remaining clients
2019-05-08 16:25:02 21093 [Note] Binlog end
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'partition'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_METRICS'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_CMPMEM'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_CMP'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_LOCKS'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'INNODB_TRX'
2019-05-08 16:25:02 21093 [Note] Shutting down plugin 'InnoDB'
2019-05-08 16:25:02 21093 [Note] InnoDB: FTS optimize thread exiting.
2019-05-08 16:25:02 21093 [Note] InnoDB: Starting shutdown...
2019-05-08 16:25:04 21093 [Note] InnoDB: Shutdown completed; log sequence number 14038316641
2019-05-08 16:25:04 21093 [Note] Shutting down plugin 'BLACKHOLE'
2019-05-08 16:25:04 21093 [Note] Shutting down plugin 'ARCHIVE'
2019-05-08 16:25:04 21093 [Note] Shutting down plugin 'MRG_MYISAM'
2019-05-08 16:25:04 21093 [Note] Shutting down plugin 'MyISAM'
2019-05-08 16:25:04 21093 [Note] Shutting down plugin 'MEMORY'
2019-05-08 16:25:04 21093 [Note] Shutting down plugin 'CSV'
2019-05-08 16:25:04 21093 [Note] Shutting down plugin 'sha256_password'
2019-05-08 16:25:04 21093 [Note] Shutting down plugin 'mysql_old_password'
2019-05-08 16:25:04 21093 [Note] Shutting down plugin 'mysql_native_password'
2019-05-08 16:25:04 21093 [Note] Shutting down plugin 'binlog'
2019-05-08 16:25:04 21093 [Note] /usr/sbin/mysqld: Shutdown complete
190508 16:25:04 mysqld_safe mysqld from pid file /var/lib/mysql/host.domain.com.pid ended
190508 16:25:04 mysqld_safe Logging to '/var/lib/mysql/host.domain.com.err'.
190508 16:25:04 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2019-05-08 16:25:04 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2019-05-08 16:25:04 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2019-05-08 16:25:04 0 [Note] /usr/sbin/mysqld (mysqld 5.6.43) starting as process 21605 ...
2019-05-08 16:25:04 21605 [Note] Plugin 'FEDERATED' is disabled.
2019-05-08 16:25:04 21605 [Note] InnoDB: Using atomics to ref count buffer pool pages
2019-05-08 16:25:04 21605 [Note] InnoDB: The InnoDB memory heap is disabled
2019-05-08 16:25:04 21605 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-05-08 16:25:04 21605 [Note] InnoDB: Memory barrier is not used
2019-05-08 16:25:04 21605 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-05-08 16:25:04 21605 [Note] InnoDB: Using Linux native AIO
2019-05-08 16:25:04 21605 [Note] InnoDB: Using CPU crc32 instructions
2019-05-08 16:25:04 21605 [Note] InnoDB: Initializing buffer pool, size = 1.5G
2019-05-08 16:25:04 21605 [Note] InnoDB: Completed initialization of buffer pool
2019-05-08 16:25:04 21605 [Note] InnoDB: Highest supported file format is Barracuda.
2019-05-08 16:25:04 21605 [Note] InnoDB: 128 rollback segment(s) are active.
2019-05-08 16:25:04 21605 [Note] InnoDB: Waiting for purge to start
2019-05-08 16:25:04 21605 [Note] InnoDB: 5.6.43 started; log sequence number 14038316641
2019-05-08 16:25:04 21605 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
2019-05-08 16:25:04 21605 [Note] - '127.0.0.1' resolves to '127.0.0.1';
2019-05-08 16:25:04 21605 [Note] Server socket created on IP: '127.0.0.1'.
2019-05-08 16:25:04 21605 [Note] Event Scheduler: Loaded 0 events
2019-05-08 16:25:04 21605 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.6.43' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
-
my.cnf config [mysqld] innodb_buffer_pool_size=1536M innodb_file_per_table=1 bind-address=127.0.0.1 default-storage-engine=MyISAM performance-schema=0 max_allowed_packet=268435456 open_files_limit=10000 key_buffer_size=1024M max_connections = 1000 performance-schema=0 query_cache_type=1 query_cache_size=20M query_cache_limit=256K thread_cache_size=128 sql_mode=NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION local-infile=0 wait_timeout=600 0 -
Nothing here to really tell us the issue. Next time it locks up run mysqldanin proc stat And post what that says when it's not working. 0 -
I think the command @GOT means here is: mysqladmin proc stat
And he is correct there's not much to go on here, during this time when it fails are there other issues on the server? Is anything noted in /var/log/messages at the time?0
Please sign in to leave a comment.
Comments
3 comments