High latency with redis
-
@james Okay, I do have other wordpress installs running fine. Obviously I dont really want to re-create the website as its taken me months to do and only really saw the issue when it was pushed live and started getting traffic which makes sense.
@harveywillj said in High latency with redis:
Okay, I do have other wordpress installs running fine.
That indicates that this WordPress has something special going on.
Either plugins, custom code, theme or something else.
But since it is something this custom, this does not fall into the scope of the forum or generic Cloudron mail support.I suggest either requested specialized support, which will cost extra money or to debug this problem yourself.
Start with the plugins and cross compare them with your other WordPress instances that do not have this issue.Unfortunately, I am unable to assist any further than this.
-
And the answer to your question about plugins, I am not sure. I have the standard plugins like WooCommerce, Elementor etc. Nothing obscure. Turned on Redis 15 mins ago and its already at 500ms and rising. Logs are below:
Jun 12 08:55:40 ==> Starting supervisor Jun 12 08:55:40 2025-06-12 07:55:40,317 INFO Included extra file "/etc/supervisor/conf.d/redis-service.conf" during parsing Jun 12 08:55:40 2025-06-12 07:55:40,317 INFO Included extra file "/etc/supervisor/conf.d/redis.conf" during parsing Jun 12 08:55:40 2025-06-12 07:55:40,317 INFO Set uid to user 0 succeeded Jun 12 08:55:40 2025-06-12 07:55:40,319 INFO RPC interface 'supervisor' initialized Jun 12 08:55:40 2025-06-12 07:55:40,319 CRIT Server 'inet_http_server' running without any HTTP authentication checking Jun 12 08:55:40 2025-06-12 07:55:40,319 INFO supervisord started with pid 1 Jun 12 08:55:41 2025-06-12 07:55:41,320 INFO spawned: 'redis' with pid 13 Jun 12 08:55:41 2025-06-12 07:55:41,321 INFO spawned: 'redis-service' with pid 14 Jun 12 08:55:41 13:C 12 Jun 2025 07:55:41.326 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect. Jun 12 08:55:41 13:C 12 Jun 2025 07:55:41.326 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo Jun 12 08:55:41 13:C 12 Jun 2025 07:55:41.326 * Redis version=7.4.2, bits=64, commit=00000000, modified=0, pid=13, just started Jun 12 08:55:41 13:C 12 Jun 2025 07:55:41.326 * Configuration loaded Jun 12 08:55:41 13:M 12 Jun 2025 07:55:41.326 * monotonic clock: POSIX clock_gettime Jun 12 08:55:41 13:M 12 Jun 2025 07:55:41.327 # Failed to write PID file: Permission denied Jun 12 08:55:41 13:M 12 Jun 2025 07:55:41.327 * Running mode=standalone, port=6379. Jun 12 08:55:41 13:M 12 Jun 2025 07:55:41.327 * Server initialized Jun 12 08:55:41 13:M 12 Jun 2025 07:55:41.327 * Ready to accept connections tcp Jun 12 08:55:41 Redis service endpoint listening on http://:::3000 Jun 12 08:55:42 2025-06-12 07:55:42,391 INFO success: redis entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) Jun 12 08:55:42 2025-06-12 07:55:42,391 INFO success: redis-service entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) Jun 12 08:55:55 [GET] /healthcheck Jun 12 08:56:18 [GET] /healthcheck Jun 12 08:56:42 13:M 12 Jun 2025 07:56:42.009 * 10000 changes in 60 seconds. Saving... Jun 12 08:56:42 13:M 12 Jun 2025 07:56:42.011 * Background saving started by pid 36 Jun 12 08:56:42 36:C 12 Jun 2025 07:56:42.143 * DB saved on disk Jun 12 08:56:42 36:C 12 Jun 2025 07:56:42.144 * Fork CoW for RDB: current 2 MB, peak 2 MB, average 1 MB Jun 12 08:56:42 13:M 12 Jun 2025 07:56:42.213 * Background saving terminated with success Jun 12 08:57:36 [GET] /healthcheck Jun 12 08:58:02 13:M 12 Jun 2025 07:58:02.382 * 10000 changes in 60 seconds. Saving... Jun 12 08:58:02 13:M 12 Jun 2025 07:58:02.384 * Background saving started by pid 42 Jun 12 08:58:02 42:C 12 Jun 2025 07:58:02.541 * DB saved on disk Jun 12 08:58:02 42:C 12 Jun 2025 07:58:02.542 * Fork CoW for RDB: current 7 MB, peak 7 MB, average 4 MB Jun 12 08:58:02 13:M 12 Jun 2025 07:58:02.585 * Background saving terminated with success Jun 12 08:59:33 13:M 12 Jun 2025 07:59:33.849 * 10000 changes in 60 seconds. Saving... Jun 12 08:59:33 13:M 12 Jun 2025 07:59:33.851 * Background saving started by pid 43 Jun 12 08:59:34 43:C 12 Jun 2025 07:59:34.037 * DB saved on disk Jun 12 08:59:34 43:C 12 Jun 2025 07:59:34.038 * Fork CoW for RDB: current 3 MB, peak 3 MB, average 2 MB Jun 12 08:59:34 13:M 12 Jun 2025 07:59:34.052 * Background saving terminated with success Jun 12 09:01:12 13:M 12 Jun 2025 08:01:12.992 * 10000 changes in 60 seconds. Saving... Jun 12 09:01:12 13:M 12 Jun 2025 08:01:12.994 * Background saving started by pid 44 Jun 12 09:01:13 44:C 12 Jun 2025 08:01:13.210 * DB saved on disk Jun 12 09:01:13 44:C 12 Jun 2025 08:01:13.211 * Fork CoW for RDB: current 3 MB, peak 3 MB, average 2 MB Jun 12 09:01:13 13:M 12 Jun 2025 08:01:13.297 * Background saving terminated with success Jun 12 09:02:14 13:M 12 Jun 2025 08:02:14.082 * 10000 changes in 60 seconds. Saving... Jun 12 09:02:14 13:M 12 Jun 2025 08:02:14.085 * Background saving started by pid 45 Jun 12 09:02:14 45:C 12 Jun 2025 08:02:14.348 * DB saved on disk Jun 12 09:02:14 45:C 12 Jun 2025 08:02:14.349 * Fork CoW for RDB: current 3 MB, peak 3 MB, average 2 MB Jun 12 09:02:14 13:M 12 Jun 2025 08:02:14.387 * Background saving terminated with success Jun 12 09:03:15 13:M 12 Jun 2025 08:03:15.053 * 10000 changes in 60 seconds. Saving... Jun 12 09:03:15 13:M 12 Jun 2025 08:03:15.055 * Background saving started by pid 46 Jun 12 09:03:15 46:C 12 Jun 2025 08:03:15.222 * DB saved on disk Jun 12 09:03:15 46:C 12 Jun 2025 08:03:15.224 * Fork CoW for RDB: current 2 MB, peak 2 MB, average 1 MB Jun 12 09:03:15 13:M 12 Jun 2025 08:03:15.256 * Background saving terminated with success Jun 12 09:04:22 13:M 12 Jun 2025 08:04:22.408 * 10000 changes in 60 seconds. Saving... Jun 12 09:04:22 13:M 12 Jun 2025 08:04:22.410 * Background saving started by pid 47 Jun 12 09:04:22 47:C 12 Jun 2025 08:04:22.655 * DB saved on disk Jun 12 09:04:22 47:C 12 Jun 2025 08:04:22.657 * Fork CoW for RDB: current 4 MB, peak 4 MB, average 2 MB Jun 12 09:04:22 13:M 12 Jun 2025 08:04:22.714 * Background saving terminated with success Jun 12 09:05:23 13:M 12 Jun 2025 08:05:23.070 * 10000 changes in 60 seconds. Saving... Jun 12 09:05:23 13:M 12 Jun 2025 08:05:23.074 * Background saving started by pid 48 Jun 12 09:05:23 48:C 12 Jun 2025 08:05:23.399 * DB saved on disk Jun 12 09:05:23 48:C 12 Jun 2025 08:05:23.400 * Fork CoW for RDB: current 9 MB, peak 9 MB, average 5 MB Jun 12 09:05:23 13:M 12 Jun 2025 08:05:23.404 * Background saving terminated with success Jun 12 09:05:55 [GET] /healthcheck Jun 12 09:06:34 13:M 12 Jun 2025 08:06:34.360 * 10000 changes in 60 seconds. Saving... Jun 12 09:06:34 13:M 12 Jun 2025 08:06:34.364 * Background saving started by pid 54 Jun 12 09:06:34 54:C 12 Jun 2025 08:06:34.701 * DB saved on disk Jun 12 09:06:34 54:C 12 Jun 2025 08:06:34.702 * Fork CoW for RDB: current 5 MB, peak 5 MB, average 3 MB Jun 12 09:06:34 13:M 12 Jun 2025 08:06:34.706 * Background saving terminated with success Jun 12 09:07:35 13:M 12 Jun 2025 08:07:35.026 * 10000 changes in 60 seconds. Saving... Jun 12 09:07:35 13:M 12 Jun 2025 08:07:35.030 * Background saving started by pid 55 Jun 12 09:07:35 55:C 12 Jun 2025 08:07:35.592 * DB saved on disk Jun 12 09:07:35 55:C 12 Jun 2025 08:07:35.594 * Fork CoW for RDB: current 3 MB, peak 3 MB, average 2 MB Jun 12 09:07:35 13:M 12 Jun 2025 08:07:35.666 * Background saving terminated with success Jun 12 09:08:57 13:M 12 Jun 2025 08:08:57.634 * 10000 changes in 60 seconds. Saving... Jun 12 09:08:57 13:M 12 Jun 2025 08:08:57.638 * Background saving started by pid 56 Jun 12 09:08:58 56:C 12 Jun 2025 08:08:58.208 * DB saved on disk Jun 12 09:08:58 56:C 12 Jun 2025 08:08:58.210 * Fork CoW for RDB: current 6 MB, peak 6 MB, average 3 MB Jun 12 09:08:58 13:M 12 Jun 2025 08:08:58.243 * Background saving terminated with success Jun 12 09:10:18 13:M 12 Jun 2025 08:10:18.012 * 10000 changes in 60 seconds. Saving... Jun 12 09:10:18 13:M 12 Jun 2025 08:10:18.018 * Background saving started by pid 57 Jun 12 09:10:18 57:C 12 Jun 2025 08:10:18.598 * DB saved on disk Jun 12 09:10:18 57:C 12 Jun 2025 08:10:18.600 * Fork CoW for RDB: current 4 MB, peak 4 MB, average 2 MB Jun 12 09:10:18 13:M 12 Jun 2025 08:10:18.622 * Background saving terminated with success
@harveywillj said in High latency with redis:
Jun 12 09:01:12 13:M 12 Jun 2025 08:01:12.992 * 10000 changes in 60 seconds. Saving...
10k changes in 60 seconds seems like a lot.
But to take a step back. For many apps redis is a persistent store (like a database). In context of WP, redis is just an optional thing and it is just an object cache. See https://wordpress.org/plugins/wp-redis/ . Is there a reason you want to use redis at all ? Just disable redis and use the local file cache for objects. In all cases, local cache will be faster than redis . The reason redis is even present is because some people back in the day insisted on this for reasons I don't remember. In fact, we should probably remove redis altogether from the WP packages .
-
Oh really, that's interesting. Is this local cache something I have to setup or is this a default behaviour by WP? I just figured redis helps a lot especially with backend admin jobs. We have a large website pushing £3M+ a year with 2k+ products and counting.
-
Oh really, that's interesting. Is this local cache something I have to setup or is this a default behaviour by WP? I just figured redis helps a lot especially with backend admin jobs. We have a large website pushing £3M+ a year with 2k+ products and counting.
@harveywillj redis (in WP) has nothing do with backend admin jobs. It's used as an object cache in WP. There's many levels and kinds of caching .But if you want object caching, you can use some plugin like W3 Total Cache and set it up to use ACPu (in memory cache). There's many options to cache and minify pages on disk or something like cloudflare to proxy requests.
I will look into making redis disabled by default in any case .