• Resolved clip1492

    (@clip1492)


    I’m getting this error:

    “Service Unavailable

    The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

    Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request.”

    PRECEDENTS: Redis service terminated yesterday due to:
    “Out of memory: The process “redis-server” was terminated because the system is low on memory.

    Memory Information: Process Total Virtual Memory: 10042792kB. Used: 6.55 GB, Available: 8.96 GB, Installed: 15.51 GB. Uptime: 19 days, 7 hours, 30 minutes, and 42 seconds. “

    As site was down. I tried next, in this order:
    – Deleted wp-content/object-cache.php, (this resolves the 503 error and get things back to normal, despite object cache is disabled).
    – Restarted redis service from terminal
    – Issue redis FLUSHALL on terminal. It returns “OK”. Still 503 when enabling redis on the plugin.
    – Deinstalled the WP Redis plugin and reinstalled again. Still 503 when enabling it. As it is a production site, I delete object-cache after each 503.
    – Deinstalled the redis service on the server and re-installed from the repo (last version). Still 503 when enabling object cache on the plugin.
    – Graceful Server reboot. Still 503.
    – Checked wp-config, all values seem correct, as suggested on readme.doc. Tried several settings, as add a prefix, change database number, etc.
    – Tested the staging site and Redis works perfectly there on staging when enabled. It is the same server, different directory on public_html.
    – Deleted all wp transients on production site. Still 503.
    – Redis flushall again from terminal. -> returns “OK”.
    – Read this forum, everything I’ve tried doesn’t works, still a 503. (I’m aware I can delete object-cache.php to get things back to normal, without oject cache. While staging site works well all time with redis object cache

    While error.log shows nothing, var/log/redis shows:

    12911:M 14 Oct 2024 12:14:29.065 * 1 changes in 3600 seconds. Saving…

    12911:M 14 Oct 2024 12:14:29.066 * Background saving started by pid 28339

    28339:C 14 Oct 2024 12:14:29.181 * DB saved on disk

    28339:C 14 Oct 2024 12:14:29.184 * Fork CoW for RDB: current 0 MB, peak 0 MB, average 0 MB

    12911:M 14 Oct 2024 12:14:29.268 * Background saving terminated with success

    Not sure if this is related to the staging site. However production still shows 503 when enabling redis, both on admin and front end.

    Do I’m missing something?

    • This topic was modified 3 weeks, 6 days ago by clip1492.
    • This topic was modified 3 weeks, 6 days ago by clip1492.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter clip1492

    (@clip1492)

    Forgot to mention also the diagnostics on Redis plugin:

    Status: Not enabled
    Filesystem: Writeable
    Redis: Reachable

    Status: Not enabled Client: Drop-in: Not installed Disabled: No PhpRedis: Not loaded Relay: Not loaded Predis: 2.1.2 Credis: Not loaded PHP Version: 8.3.12 Plugin Version: 2.5.3 Redis Version: Unknown Multisite: No Metrics: Disabled Metrics recorded: 0 Filesystem: Writable WP_REDIS_PLUGIN_PATH: “/home/smokings/public_html/wp-content/plugins/redis-cache” Drop-ins: []

    Plugin Author Till Krüss

    (@tillkruess)

    Out of memory: The process “redis-server” was terminated because the system is low on memory.

    That means you need give Redis more memory or set a maxmemory-policy in your redis.conf file so that the server keeps it memory under the configured limit.

    Thread Starter clip1492

    (@clip1492)

    As Total Server Memory is 16GB, Swap: 4Gb, Free: 2.6 Gb , Buffer/Cache: 7Gb (this can be liberated)

    Then I’ve edited redis.config with:

    maxmemory 1024mb
    maxmemory-policy allkeys-lru

    then sudo systemctl restart redis which shows status active.

    Issued: redis-cli FLUSHALL again, just in case.
    Updated the plugin to the latest version released hours ago.

    Website works well, plugin shows: Status: Not enabled Filesystem: Writeable Redis: Reachable

    Clicking on “Enable Object Cache” issues again “Service Unavailable – 503” on all website pages (Admin and frontend).

    Deleting the object-cache.php on wp-contents this time doesn’t removes the 503, so I reboot the server, and everything goes back to normal, but without object cache.

    While wp error.log doens’t whows errors at the time of the 503, logs on redis.log show this:





    26313:M 16 Oct 2024 13:23:09.643 * DB loaded from disk: 0.002 seconds

    26313:M 16 Oct 2024 13:23:09.643 * Ready to accept connections tcp

    26313:M 16 Oct 2024 13:23:09.643 * Ready to accept connections unix

    26313:M 16 Oct 2024 13:24:26.072 * DB saved on disk

    26313:signal-handler (1729078073) Received SIGTERM scheduling shutdown...

    26313:M 16 Oct 2024 13:27:53.601 * User requested shutdown...

    26313:M 16 Oct 2024 13:27:53.601 * Saving the final RDB snapshot before exiting.

    26313:M 16 Oct 2024 13:27:55.104 * DB saved on disk

    26313:M 16 Oct 2024 13:27:55.104 * Removing the pid file.

    26313:M 16 Oct 2024 13:27:55.104 * Removing the unix socket file.

    26313:M 16 Oct 2024 13:27:55.104 # Redis is now ready to exit, bye bye...

    1333:C 16 Oct 2024 13:28:56.280 * Supervised by systemd. Please make sure you set appropriate values for TimeoutStartSec and TimeoutStopSec in your service unit.

    1333:C 16 Oct 2024 13:28:56.281 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo

    1333:C 16 Oct 2024 13:28:56.281 * Redis version=7.2.5, bits=64, commit=00000000, modified=0, pid=1333, just started

    1333:C 16 Oct 2024 13:28:56.281 * Configuration loaded

    1333:M 16 Oct 2024 13:28:56.282 * monotonic clock: POSIX clock_gettime

    1333:M 16 Oct 2024 13:28:56.283 # Failed to write PID file: Permission denied

    1333:M 16 Oct 2024 13:28:56.283 * Running mode=standalone, port=6379.

    1333:M 16 Oct 2024 13:28:56.284 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.

    1333:M 16 Oct 2024 13:28:56.284 * Server initialized

    1333:M 16 Oct 2024 13:28:56.285 * Loading RDB produced by version 7.2.5

    1333:M 16 Oct 2024 13:28:56.285 * RDB age 63 seconds

    1333:M 16 Oct 2024 13:28:56.285 * RDB memory usage when created 1.43 Mb

    1333:M 16 Oct 2024 13:28:56.288 * Done loading RDB, keys loaded: 2, keys expired: 0.

    1333:M 16 Oct 2024 13:28:56.288 * DB loaded from disk: 0.004 seconds

    1333:M 16 Oct 2024 13:28:56.289 * Ready to accept connections tcp

    1333:M 16 Oct 2024 13:28:56.289 * Ready to accept connections unix

    Any clue about how to solve it? Much appreciated in advance.

    • This reply was modified 3 weeks, 4 days ago by clip1492.
    • This reply was modified 3 weeks, 4 days ago by clip1492.
    Plugin Author Till Krüss

    (@tillkruess)

    Can you enable WP_DEBUG and see what the 503 error is really about?

    Thread Starter clip1492

    (@clip1492)

    I’ve enabled WP_DEBUG and the 503 doesn’t returns any error debug.log. I already checked this, and i would be more than happy if the system returns a clue about what is happening. Also no errors stated on redis.log.

    To recover the site, deleting object-cache-php is not enough, nor restarting redis service from terminal, but I must restart Apache and then things get back to normal.

    • This reply was modified 2 weeks, 4 days ago by clip1492.
    • This reply was modified 2 weeks, 4 days ago by clip1492.
    • This reply was modified 2 weeks, 4 days ago by clip1492.
    Plugin Author Till Krüss

    (@tillkruess)

    That sounds like an issue with Apache’s PHP handler dying. Can you check your Apache logs?

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.