Hi Experts
,
We are currently experiencing performance issues with our LiteSpeed server. Our server configuration is:
CPU:4 Cores - 8 Threads
RAM: 32768 MB
Storage:2x 240GB SSD
And the application running on server is : Plesk, Litespeed enterprise and Wordpress, Woocommerce
This problem seems to be same as the orginal topic issue. Last year, during a campaign, we encountered similar server performance issues.
We're facing performance problems. At peak times, we estimate around 4000-5000 concurrent users accessing various pages on our site. I've attached the page resource usage from the Query Monitor Plugin for your reference.
Upon investigation during peak traffic, our MySQL logs revealed numerous errors similar to the following:
2023-11-20 12:22:10 1081 [Warning] Aborted connection 1081 to db: 'main' user: 'use' host: 'localhost' (Got an error reading communication packets)
2023-11-20 12:22:10 1186 [Warning] Aborted connection 1186 to db: 'main' user: 'use' host: 'localhost' (Got an error reading communication packets)
2023-11-20 12:22:10 1170 [Warning] Aborted connection 1170 to db: 'main' user: 'use' host: 'localhost' (Got an error reading communication packets)
2023-11-20 12:22:10 1285 [Warning] Aborted connection 1285 to db: 'main' user: 'use' host: 'localhost' (Got an error reading communication packets)
Additionally, the 'top' command indicates that the CPU load exceeds 104,110 during these periods.
In an attempt to mitigate these issues, we made adjustments to various LiteSpeed settings:
- PHP_LSAPI_CHILDREN: Increased from 90 to 300 and subsequently to 1000
- Max Connections: Expanded from 300 to 1500
- PHP suEXEC Max Conn: Raised from 300 to 600 and later to 1500
Unfortunately, none of these alterations alleviated the CPU load, which may have contributed to MySQL crashes.
It's important to note that we employ LSCache and Quic.CDN, and have executed all recommended caching and performance optimizations.
Regarding MySQL performance, we've implemented the following tweaks to the SQL settings:
- local-infile=0
- innodb_buffer_pool_size=16G
- innodb_log_file_size=2G
- max_connections = 800
- performance_schema = on
- slow_query_log = 1
- slow_query_log_file = /var/log/mysql-slow.log
- long_query_time = 2
- skip-name-resolve=ON
- table_definition_cache = 1000
I'd feel relieved if someone could assist me; it's puzzling because I'm aware that the current number of concurrent users shouldn't strain the server's resources.