Accumulating Woocommerce transients increase cpu usage
-
Hello Woocommerce developers,
Two months ago I noticed an increase in CPU usage under the same conditions: 5000-7000 products and about 30 attributes (filter). I have VPS on my own office server (s). Our site has been updated with the latest versions of WordPress, Theme and Plugins! Works on Ubuntu 18.04, Apache 2.4.43, MYSQL 5.7. and PHP 7.3. The physical parameters are: CPU 12-24, RAM 32-80 … GB, SAS HDD. After rebooting the server, gradually after about 2-4 hours the site is overloaded, MYSQL uses over 150% of the CPU. I installed new configuration EVERYTHING fresh: NGINX 1.14; PHP 7.3-fpm (for NGINX); MYSQL 8 and the same theme and plugins. Nothing has changed!
Tests WP Total cache and the like – nothing. I lost a month and realized that by deleting Woocommerce’s transients through crontab every 10 min. (*/10 * * * * wp transient delete –all –path=) then everything is fine. With old versions of the site from 1 year ago, there was no such problem!!!!In addition, I configured MYSQL parameters, like these:
default-storage-engine = InnoDB
innodb_log_file_size = 5G
innodb_log_files_in_group = 2
innodb_open_files = 4000
innodb_buffer_pool_size = 40G
innodb_buffer_pool_instances = 40
innodb_log_buffer_size = 64M
innodb_flush_log_at_trx_commit = 0
innodb_flush_method=O_DIRECT_NO_FSYNC
innodb_max_dirty_pages_pct = 90
innodb_max_dirty_pages_pct_lwm = 10
innodb_lru_scan_depth = 1024
innodb_page_cleaners = 4
innodb_use_native_aio = 1
innodb_stats_persistent = 1
innodb_adaptive_flushing = 1
innodb_flush_neighbors = 0
innodb_read_io_threads = 40
innodb_write_io_threads = 40
innodb_io_capacity = 1500
innodb_io_capacity_max = 2500
innodb_purge_threads = 4
innodb_adaptive_hash_index = 0join_buffer_size = 512K
sort_buffer_size = 256K
max_prepared_stmt_count = 100000
max_connections = 1000
table_open_cache = 2000
table_open_cache_instances = 12
#Test
key_buffer_size = 10MThe influence is mainly from:
innodb_log_file_size = 5G
innodb_log_files_in_group = 2
innodb_open_files = 4000
innodb_buffer_pool_size = 40GWhen transients where deleted, the saturated value of CPU stays ~ 5-6 VPS CPUs (from total 12 to 24) and MYSQL RAM usage is ~ 20 Gb
Please help!
- The topic ‘Accumulating Woocommerce transients increase cpu usage’ is closed to new replies.