How do I optimize my.cnf for my server as my website keep crashing

Sunlander

Well-Known Member
May 7, 2018
68
4
58
UK
cPanel Access Level
Root Administrator
Hi,

I am having a nightmare with constant 504 Gateway errors. I have spent the last week trying to troubleshoot the website (checking plugins etc.) l am now looking at whether it is the server settings.

My dedicated server spec is as follows:

Usage


1% 6 CPU cores 1.98% / 100%
5% RAM 3.57GB / 64GB
27% Disk space - RAID 1 1080GB / 4000GB

My current my.cnf is as follows:

# For advice on how to change settings please see
# MySQL :: MySQL 5.7 Reference Manual :: 5.1.2 Server Configuration Defaults

[mysqld]
performance-schema=0
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
innodb_buffer_pool_size=134217728
max_allowed_packet=268435456
open_files_limit=80000
innodb_file_per_table=1
sql_mode=""
innodb_lock_wait_timeout=600
table_definition_cache=2400

I ran the following command as recommended on this forum:

perl mysqltuner.pl

This is the output result:

[root@********* ~]# perl mysqltuner.pl
>> MySQLTuner 2.1.1
* Jean-Marie Renouard <[email protected]>
* Major Hayden <[email protected]>
>> Bug reports, feature requests, and downloads at http://mysqltuner.pl/
>> Run with '--help' for additional options and output filtering

[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.7.41
[OK] Operating on 64-bit architecture

-------- Log file Recommendations ------------------------------------------------------------------
[OK] Log file /var/log/mysqld.log exists
[--] Log file: /var/log/mysqld.log (13M)
[OK] Log file /var/log/mysqld.log is not empty
[OK] Log file /var/log/mysqld.log is smaller than 32 Mb
[OK] Log file /var/log/mysqld.log is readable.
[!!] /var/log/mysqld.log contains 2696 warning(s).
[!!] /var/log/mysqld.log contains 56 error(s).
[--] 135 start(s) detected in /var/log/mysqld.log
[--] 1) 2023-03-11T12:46:35.812518Z 0 [Note] /usr/sbin/mysqld: ready for connections.
[--] 2) 2023-03-10T21:16:06.136825Z 0 [Note] /usr/sbin/mysqld: ready for connections.
[--] 3) 2023-03-10T21:15:20.211184Z 0 [Note] /usr/sbin/mysqld: ready for connections.
[--] 4) 2023-03-10T21:11:19.815661Z 0 [Note] /usr/sbin/mysqld: ready for connections.
[--] 5) 2023-03-10T21:10:39.171686Z 0 [Note] /usr/sbin/mysqld: ready for connections.
[--] 6) 2023-03-10T21:08:09.595549Z 0 [Note] /usr/sbin/mysqld: ready for connections.
[--] 7) 2023-03-10T19:22:30.916065Z 0 [Note] /usr/sbin/mysqld: ready for connections.
[--] 8) 2023-03-10T19:16:41.922037Z 0 [Note] /usr/sbin/mysqld: ready for connections.
[--] 9) 2023-03-10T19:09:20.765730Z 0 [Note] /usr/sbin/mysqld: ready for connections.
[--] 10) 2023-03-10T18:43:37.690382Z 0 [Note] /usr/sbin/mysqld: ready for connections.
[--] 134 shutdown(s) detected in /var/log/mysqld.log
[--] 1) 2023-03-11T12:44:17.794191Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
[--] 2) 2023-03-10T21:16:04.842097Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
[--] 3) 2023-03-10T21:15:18.893364Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
[--] 4) 2023-03-10T21:11:18.524612Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
[--] 5) 2023-03-10T21:10:37.702510Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
[--] 6) 2023-03-10T21:08:07.992249Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
[--] 7) 2023-03-10T19:22:29.523621Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
[--] 8) 2023-03-10T19:16:40.551204Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
[--] 9) 2023-03-10T19:09:19.250949Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
[--] 10) 2023-03-10T18:43:36.216573Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

-------- Storage Engine Statistics -----------------------------------------------------------------
[--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MEMORY +MRG_MYISAM +MyISAM +PERFORMANCE_SCHEMA
[--] Data in MyISAM tables: 7.2G (Tables: 13218)
[--] Data in InnoDB tables: 9.1G (Tables: 27099)
[--] Data in MEMORY tables: 2.4M (Tables: 130)
[OK] Total fragmented tables: 0

-------- Analysis Performance Metrics --------------------------------------------------------------
[--] innodb_stats_on_metadata: OFF
[OK] No stat updates during querying INFORMATION_SCHEMA.

-------- Views Metrics -----------------------------------------------------------------------------

-------- Triggers Metrics --------------------------------------------------------------------------

-------- Routines Metrics --------------------------------------------------------------------------

-------- Security Recommendations ------------------------------------------------------------------
[OK] No Role user detected
[OK] There are no anonymous accounts for any database users
[OK] All database users have passwords assigned
[!!] There is no basic password file list!

-------- CVE Security Recommendations --------------------------------------------------------------
[--] Skipped due to --cvefile option undefined

-------- Performance Metrics -----------------------------------------------------------------------
[--] Up for: 22m 32s (83K q [61.935 qps], 1K conn, TX: 1G, RX: 11M)
[--] Reads / Writes: 96% / 4%
[--] Binary logging is disabled
[--] Physical Memory : 62.5G
[--] Max MySQL memory : 38.1G
[--] Other process memory: 0B
[--] Total buffers: 169.0M global + 257.1M per thread (151 max threads)
[--] Performance_schema Max memory usage: 0B
[--] Galera GCache Max memory usage: 0B
[OK] Maximum reached memory usage: 3.4G (5.48% of installed RAM)
[OK] Maximum possible memory usage: 38.1G (60.88% of installed RAM)
[OK] Overall possible memory usage with other process is compatible with memory available
[OK] Slow queries: 0% (0/83K)
[OK] Highest usage of available connections: 8% (13/151)
[OK] Aborted connections: 0.08% (1/1210)
[!!] CPanel and Flex system skip-name-resolve should be on
[OK] Query cache is disabled by default due to mutex contention on multiprocessor machines.
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 11K sorts)
[!!] Joins performed without indexes: 188
[!!] Temporary tables created on disk: 52% (3K on disk / 6K total)
[OK] Thread cache hit rate: 98% (13 created / 1K connections)
[OK] Table cache hit rate: 98% (163K hits / 166K requests)
[!!] table_definition_cache (2400) is less than number of tables (40727)
[OK] Open file limit used: 2% (1K/80K)
[OK] Table locks acquired immediately: 100% (47K immediate / 47K locks)

-------- Performance schema ------------------------------------------------------------------------
[!!] Performance_schema should be activated.
[--] Sys schema is installed.

-------- ThreadPool Metrics ------------------------------------------------------------------------
[--] ThreadPool stat is disabled.

-------- MyISAM Metrics ----------------------------------------------------------------------------
[OK] Key buffer used: 99.3% (7.9M used / 8.0M cache)
[OK] Key buffer size / total MyISAM indexes: 8.0M/1.4G
[OK] Read Key buffer hit rate: 99.8% (6M cached / 14K reads)
[OK] Write Key buffer hit rate: 98.8% (4K cached / 4K writes)

-------- InnoDB Metrics ----------------------------------------------------------------------------
[--] InnoDB is enabled.
[--] InnoDB Thread Concurrency: 0
[OK] InnoDB File per table is activated
[!!] InnoDB buffer pool / data size: 128.0M / 9.1G
[!!] Ratio InnoDB log file size / InnoDB Buffer pool size (75%): 48.0M * 2 / 128.0M should be equal to 25%
[OK] InnoDB buffer pool instances: 1
[--] Number of InnoDB Buffer Pool Chunk: 1 for 1 Buffer Pool Instance(s)
[OK] Innodb_buffer_pool_size aligned with Innodb_buffer_pool_chunk_size & Innodb_buffer_pool_instances
[OK] InnoDB Read buffer efficiency: 99.73% (4600954 hits / 4613210 total)
[!!] InnoDB Write Log efficiency: 3.6% (53 hits / 1472 total)
[OK] InnoDB log waits: 0.00% (0 waits / 1419 writes)

-------- Aria Metrics ------------------------------------------------------------------------------
[--] Aria Storage Engine not available.

-------- TokuDB Metrics ----------------------------------------------------------------------------
[--] TokuDB is disabled.

-------- XtraDB Metrics ----------------------------------------------------------------------------
[--] XtraDB is disabled.

-------- Galera Metrics ----------------------------------------------------------------------------
[--] Galera is disabled.

-------- Replication Metrics -----------------------------------------------------------------------
[--] Galera Synchronous replication: NO
[--] No replication slave(s) for this server.
[--] Binlog format: ROW
[--] XA support enabled: ON
[--] Semi synchronous replication Master: Not Activated
[--] Semi synchronous replication Slave: Not Activated
[--] This is a standalone server

-------- Recommendations ---------------------------------------------------------------------------
General recommendations:
Check warning line(s) in /var/log/mysqld.log file
Check error line(s) in /var/log/mysqld.log file
MySQL was started within the last 24 hours: recommendations may be inaccurate
name resolution is enabled due to cPanel doesn't support this disabled.
We will suggest raising the 'join_buffer_size' until JOINs not using indexes are found.
See MySQL: Welcome
(specially the conclusions at the bottom of the page).
When making adjustments, make tmp_table_size/max_heap_table_size equal
Reduce your SELECT DISTINCT queries which have no LIMIT clause
Performance schema should be activated for better diagnostics
Before changing innodb_log_file_size and/or innodb_log_files_in_group read this: MySQL :: MySQL 8.0 Reference Manual :: 15.6.5 Redo Log
Variables to adjust:
skip-name-resolve=0
join_buffer_size (> 256.0K, or always use indexes with JOINs)
tmp_table_size (> 16M)
max_heap_table_size (> 16M)
table_definition_cache (2400) > 40727 or -1 (autosizing if supported)
performance_schema=ON
innodb_buffer_pool_size (>= 9.1G) if possible.
innodb_log_file_size should be (=16M) if possible, so InnoDB total log file size equals 25% of buffer pool size.
[root@********* ~]#

Log results for today in /var/log/mysqld.log are

Version: '5.7.41' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
2023-03-10T21:16:06.147528Z 2 [Note] Access denied for user 'Cpanel::MysqlUtils::Unprivileged'@'localhost' (using password: NO)
2023-03-10T23:39:40.052800Z 7274 [Note] Access denied for user 'Cpanel::MysqlUtils::Unprivileged'@'localhost' (using password: NO)
2023-03-11T00:30:01.474408Z 7603 [Note] Access denied for user 'Cpanel::MysqlUtils::Unprivileged'@'localhost' (using password: NO)
2023-03-11T00:42:45.311759Z 7659 [Warning] IP address '165.232.94.10' could not be resolved: Name or service not known
2023-03-11T02:39:04.233316Z 8397 [Warning] IP address '124.133.28.21' could not be resolved: Name or service not known

2023-03-11T03:40:38.549694Z 10882 [Note] Access denied for user 'Cpanel::MysqlUtils::Unprivileged'@'localhost' (using password: NO)
2023-03-11T04:30:01.821164Z 12524 [Note] Access denied for user 'Cpanel::MysqlUtils::Unprivileged'@'localhost' (using password: NO)
2023-03-11T04:40:46.832360Z 12950 [Warning] Hostname 'obtainable-look.aeza.network' does not resolve to '212.113.116.104'.
2023-03-11T04:40:46.832378Z 12950 [Note] Hostname 'obtainable-look.aeza.network' has the following IP addresses:
2023-03-11T04:40:46.832380Z 12950 [Note] - 194.26.229.0
2023-03-11T05:32:03.118905Z 16036 [Warning] IP address '139.59.144.119' could not be resolved: Name or service not known
2023-03-11T06:07:01.950872Z 16207 [Warning] Hostname 'zg-1220g-167.stretchoid.com' does not resolve to '162.243.148.25'.
2023-03-11T06:07:01.950898Z 16207 [Note] Hostname 'zg-1220g-167.stretchoid.com' has the following IP addresses:
2023-03-11T06:07:01.950901Z 16207 [Note] - 127.0.0.1

2023-03-11T06:39:33.970413Z 17064 [Warning] IP address '167.94.146.60' could not be resolved: Name or service not known
2023-03-11T07:40:50.353592Z 18889 [Note] Access denied for user 'Cpanel::MysqlUtils::Unprivileged'@'localhost' (using password: NO)
2023-03-11T08:30:01.727041Z 19139 [Note] Access denied for user 'Cpanel::MysqlUtils::Unprivileged'@'localhost' (using password: NO)
2023-03-11T11:42:15.272072Z 24806 [Note] Access denied for user 'Cpanel::MysqlUtils::Unprivileged'@'localhost' (using password: NO)
2023-03-11T12:06:12.384555Z 25282 [Warning] Hostname 'zg-1220c-84.stretchoid.com' does not resolve to '45.55.0.10'.
2023-03-11T12:06:12.384588Z 25282 [Note] Hostname 'zg-1220c-84.stretchoid.com' has the following IP addresses:
2023-03-11T12:06:12.384591Z 25282 [Note] - 127.0.0.1
2023-03-11T12:30:01.230588Z 25715 [Note] Access denied for user 'Cpanel::MysqlUtils::Unprivileged'@'localhost' (using password: NO)
2023-03-11T12:44:16.491089Z 0 [Note] Giving 0 client threads a chance to die gracefully

2023-03-11T12:44:16.491109Z 0 [Note] Forcefully disconnecting 0 remaining clients
2023-03-11T12:44:16.491112Z 0 [Note] Event Scheduler: Purging the queue. 0 events
2023-03-11T12:44:16.491162Z 0 [Note] Binlog end
2023-03-11T12:44:16.498764Z 0 [Note] Shutting down plugin 'ngram'
2023-03-11T12:44:16.498772Z 0 [Note] Shutting down plugin 'partition'
2023-03-11T12:44:16.498775Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2023-03-11T12:44:16.498780Z 0 [Note] Shutting down plugin 'ARCHIVE'
2023-03-11T12:44:16.498782Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2023-03-11T12:44:16.498795Z 0 [Note] Shutting down plugin 'MRG_MYISAM'

2023-03-11T12:44:16.498809Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2023-03-11T12:44:16.498811Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2023-03-11T12:44:16.498813Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2023-03-11T12:44:16.498815Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2023-03-11T12:44:16.498816Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2023-03-11T12:44:16.498818Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2023-03-11T12:44:16.498820Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2023-03-11T12:44:16.498821Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2023-03-11T12:44:16.498823Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2023-03-11T12:44:16.498825Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'

2023-03-11T12:44:16.498826Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2023-03-11T12:44:16.498828Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2023-03-11T12:44:16.498830Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2023-03-11T12:44:16.498831Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2023-03-11T12:44:16.498833Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2023-03-11T12:44:16.498835Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2023-03-11T12:44:16.498836Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2023-03-11T12:44:16.498838Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2023-03-11T12:44:16.498840Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'

2023-03-11T12:44:16.498844Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2023-03-11T12:44:16.498845Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2023-03-11T12:44:16.498847Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2023-03-11T12:44:16.498849Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2023-03-11T12:44:16.498850Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2023-03-11T12:44:16.498852Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2023-03-11T12:44:16.498854Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2023-03-11T12:44:16.498856Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2023-03-11T12:44:16.498857Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'

2023-03-11T12:44:16.498860Z 0 [Note] Shutting down plugin 'InnoDB'
2023-03-11T12:44:16.499254Z 0 [Note] InnoDB: FTS optimize thread exiting.
2023-03-11T12:44:16.499302Z 0 [Note] InnoDB: Starting shutdown...
2023-03-11T12:44:16.599723Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2023-03-11T12:44:16.600369Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 230311 12:44:16
2023-03-11T12:44:17.782884Z 0 [Note] InnoDB: Shutdown completed; log sequence number 98498520682
2023-03-11T12:44:17.793417Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2023-03-11T12:44:17.793428Z 0 [Note] Shutting down plugin 'MEMORY'
2023-03-11T12:44:17.793440Z 0 [Note] Shutting down plugin 'CSV'

2023-03-11T12:44:17.793445Z 0 [Note] Shutting down plugin 'mysql_native_password'
2023-03-11T12:44:17.793520Z 0 [Note] Shutting down plugin 'binlog'
2023-03-11T12:44:17.794191Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

2023-03-11T12:46:35.107940Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option ($
2023-03-11T12:46:35.108030Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2023-03-11T12:46:35.108152Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.41) starting as process 28411 ...
2023-03-11T12:46:35.110050Z 0 [Note] InnoDB: PUNCH HOLE support available
2023-03-11T12:46:35.110070Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2023-03-11T12:46:35.110076Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2023-03-11T12:46:35.110081Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.12
2023-03-11T12:46:35.110084Z 0 [Note] InnoDB: Using Linux native AIO
2023-03-11T12:46:35.110255Z 0 [Note] InnoDB: Number of pools: 1
2023-03-11T12:46:35.110329Z 0 [Note] InnoDB: Using CPU crc32 instructions
2023-03-11T12:46:35.111276Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2023-03-11T12:46:35.115675Z 0 [Note] InnoDB: Completed initialization of buffer pool
2023-03-11T12:46:35.116984Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of$
2023-03-11T12:46:35.128371Z 0 [Note] InnoDB: Highest supported file format is Barracuda.

2023-03-11T12:46:35.600335Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2023-03-11T12:46:35.685186Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2023-03-11T12:46:35.686545Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2023-03-11T12:46:35.686552Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2023-03-11T12:46:35.686815Z 0 [Note] InnoDB: Waiting for purge to start
2023-03-11T12:46:35.736921Z 0 [Note] InnoDB: 5.7.41 started; log sequence number 98498520682
2023-03-11T12:46:35.737014Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2023-03-11T12:46:35.737114Z 0 [Note] Plugin 'FEDERATED' is disabled.
2023-03-11T12:46:35.738934Z 0 [Note] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.

2023-03-11T12:46:35.738948Z 0 [Warning] A deprecated TLS version TLSv1 is enabled. Please use TLSv1.2 or higher.
2023-03-11T12:46:35.738951Z 0 [Warning] A deprecated TLS version TLSv1.1 is enabled. Please use TLSv1.2 or higher.
2023-03-11T12:46:35.739446Z 0 [Warning] CA certificate ca.pem is self signed.
2023-03-11T12:46:35.739531Z 0 [Note] Skipping generation of RSA key pair as key files are present in data directory.
2023-03-11T12:46:35.739766Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2023-03-11T12:46:35.739791Z 0 [Note] IPv6 is available.
2023-03-11T12:46:35.739797Z 0 [Note] - '::' resolves to '::';
2023-03-11T12:46:35.739800Z 0 [Note] Server socket created on IP: '::'.
2023-03-11T12:46:35.746736Z 0 [Note] InnoDB: Buffer pool(s) load completed at 230311 12:46:35

2023-03-11T12:46:35.812518Z 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.7.41' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
2023-03-11T12:46:37.827655Z 2 [Note] Access denied for user 'Cpanel::MysqlUtils::Unprivileged'@'localhost' (using password: NO)
2023-03-11T15:02:23.376784Z 6113 [Warning] IP address '34.77.127.183' has been resolved to the host name '183.127.77.34.bc.googleusercontent.com', which $
2023-03-11T15:46:32.238464Z 6341 [Note] Access denied for user 'Cpanel::MysqlUtils::Unprivileged'@'localhost' (using password: NO)
2023-03-11T16:30:01.196821Z 7702 [Note] Access denied for user 'Cpanel::MysqlUtils::Unprivileged'@'localhost' (using password: NO)
2023-03-11T16:58:14.036099Z 8204 [Warning] IP address '205.210.31.36' could not be resolved: Name or service not known
2023-03-11T17:30:19.883438Z 8780 [Warning] Hostname 'obtainable-look.aeza.network' does not resolve to '212.113.116.104'.
2023-03-11T17:30:19.883456Z 8780 [Note] Hostname 'obtainable-look.aeza.network' has the following IP addresses:
2023-03-11T17:30:19.883458Z 8780 [Note] - 194.26.229.0
2023-03-11T18:34:39.270344Z 11634 [Warning] IP address '157.245.139.197' could not be resolved: Name or service not known
2023-03-11T18:34:57.647244Z 11654 [Warning] IP address '152.32.129.70' could not be resolved: Name or service not known
2023-03-11T19:50:03.546390Z 13154 [Note] Access denied for user 'Cpanel::MysqlUtils::Unprivileged'@'localhost' (using password: NO)

2023-03-11T12:46:35.739800Z 0 [Note] Server socket created on IP: '::'.
2023-03-11T12:46:35.746736Z 0 [Note] InnoDB: Buffer pool(s) load completed at 230311 12:46:35
2023-03-11T12:46:35.812401Z 0 [Note] Event Scheduler: Loaded 0 events
2023-03-11T12:46:35.812518Z 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.7.41' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
2023-03-11T12:46:37.827655Z 2 [Note] Access denied for user 'Cpanel::MysqlUtils::Unprivileged'@'localhost' (using password: NO)
2023-03-11T15:02:23.376784Z 6113 [Warning] IP address '34.77.127.183' has been resolved to the host name '183.127.77.34.bc.googleusercontent.com', which $
2023-03-11T15:46:32.238464Z 6341 [Note] Access denied for user 'Cpanel::MysqlUtils::Unprivileged'@'localhost' (using password: NO)
2023-03-11T16:30:01.196821Z 7702 [Note] Access denied for user 'Cpanel::MysqlUtils::Unprivileged'@'localhost' (using password: NO)
2023-03-11T16:58:14.036099Z 8204 [Warning] IP address '205.210.31.36' could not be resolved: Name or service not known
2023-03-11T17:30:19.883438Z 8780 [Warning] Hostname 'obtainable-look.aeza.network' does not resolve to '212.113.116.104'.
2023-03-11T17:30:19.883456Z 8780 [Note] Hostname 'obtainable-look.aeza.network' has the following IP addresses:
2023-03-11T17:30:19.883458Z 8780 [Note] - 194.26.229.0
2023-03-11T18:34:39.270344Z 11634 [Warning] IP address '157.245.139.197' could not be resolved: Name or service not known
2023-03-11T18:34:57.647244Z 11654 [Warning] IP address '152.32.129.70' could not be resolved: Name or service not known
2023-03-11T19:50:03.546390Z 13154 [Note] Access denied for user 'Cpanel::MysqlUtils::Unprivileged'@'localhost' (using password: NO)



My questions are:

1. Is there anything in those results that would be the cause of my 504 Gateway error and poor performance?
2. What should I change/add to my.cnf to improve the performance for my dedicated specification?
3. If this isn't something you'd recommend I try myself is there someone at Cpanel who can help me tune this and PHP settings to eradicate these problems and speed up performance and what is the cost?

I did try changing some settings but then when i saved it crashed so had to revert back to the default my.cnf as shown above.

I do hope you can help me as this is destroying my user experience.

Kind regards
 
Last edited:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,591
2,614
363
cPanel Access Level
Root Administrator
Hey there! In general, I would not expect MySQL to be the source of your 504 errors. You could confirm this by checking the following command during a time when you see a large number of the 504 errors happening:

Code:
mysqladmin proc status
This will show you what the MySQL server is doing in real-time, and will show you if you have a large amount of slow queries or errors from MySQL itself. If not, you know that you can look elsewhere for the source of the 504 errors.