I have a dedicated server with these info:
128G RAM
6 cores/12 threads CPU, 3.4GHz
512 SSD storage
WHM/Cpanel latest
Apache/MySQL
Centos 7.x
I have a single website on this server which have heavy traffic at specific times of each day for less than one hour. At the peak traffic about 6000 users according to google analytics real time stats.
The average page load time by the server at about 500 users is about 0.15 seconds and the website code is very optimized for mysql.
The problem the server until 2000 concurrent users never have problem. After that number of users the Server load sometimes becomes 100% and above and mysql load becomes 600-900% and the website takes forever to load and displays server busy page and most of the time I have to restart mysql and apache servers.
These are my current settings in WHM for Apache:
Start Servers = 5
Minimum Spare Servers = 5
Maximum Spare Servers =10
Server Limit (Maximum: 20,000) = 5000
Max Request Workers = 5000
Max Connections Per Child = 10000
Max Keep-Alive Requests = unlimited
Timeout = 300
These are my settings for mysql in my.cnf which is default by WHM:
# This group is read both both by the client and the server
# use it for options that affect everything
#
[client-server]
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
[mysqld]
log-error=/var/lib/mysql/hosting.hostrose.com.err
performance-schema=0
default-storage-engine=MyISAM
innodb_file_per_table=1
innodb_buffer_pool_size=134217728
max_allowed_packet=268435456
open_files_limit=10000
max_connections=151
My question, what is the best values for these vars to serve that number of users without overloading or hanging the server specially for apache and mysql connections numbers.