Error: redis server service failed with result start limit hit
What's Causing This Error
When you receive the error message 'redis server service failed with result start limit hit', it means that the Redis server was unable to start due to exceeding the system's start limit. This can occur if the Redis server is set to automatically start but fails to do so or repeatedly crashes. As a result, the system restricts the number of times the service can restart within a certain timeframe, leading to this error.
Insufficient memory resources can also cause this error. If there isn't enough memory available for the Redis server to start, it may fail to do so and generate this error.
Solution - Here's How To Resolve It
To resolve this issue, you should follow these steps:
-
Check the Redis configuration file for any issues: First, open the Redis configuration file using the command
sudo nano /etc/redis/redis.conf
. Ensure that the configuration file is accurately configured with the appropriate parameters. If you find any errors, correct them. For instance, if themaxmemory
setting is too low, increase it according to your server capacity. -
Restart the Redis Server: Once you have made necessary changes in the configuration file, save and exit by pressing
Ctrl + X
, thenY
, thenEnter
. After that, try restarting the Redis server with the commandsystemctl restart redis.service
. -
Examine the system's memory availability: If the Redis configuration file is correct, review the system's memory usage using monitoring tools like 'top' or 'htop'. These tools can be used by simply typing either
top
orhtop
in your terminal. If the system has insufficient memory, free up some memory by stopping unimportant services withsystemctl stop [service-name]
, or consider increasing the system's memory capacity. -
Increase the restart limit for the Redis server service: If the error still persists, the restart limit of the Redis service can be increased. This can be done by modifying the systemd configuration file for the Redis service (
/etc/systemd/system/redis.service
). Increase the 'StartLimitIntervalSec' and 'StartLimitBurst' parameters to permit the service to restart more frequently within a specified time frame.
For example, you can set StartLimitIntervalSec
to 0 and StartLimitBurst
to any large number like 5000.
You can make these changes with the following commands:
sudo nano /etc/systemd/system/redis.service # Change StartLimitIntervalSec=0 and StartLimitBurst=5000 # Save and exit using Ctrl + X, then Y, then Enter
After making these changes, reload the systemctl daemon to apply the changes with the command systemctl daemon-reload
, and try restarting the Redis server again with systemctl restart redis.service
.
Was this content helpful?
Other Common Redis Errors (with Solutions)
- could not connect to redis at 127.0.0.1:6379: connection refused
- redis error server closed the connection
- redis.exceptions.responseerror: value is not an integer or out of range
- redis.exceptions.responseerror moved
- redis-server failed to start advanced key-value store
- spring boot redis unable to connect to localhost 6379
- unable to configure redis to keyspace notifications
- redis.clients.jedis.exceptions.jedismoveddataexception
- could not get resource from pool redis
- failed to restart redis service unit redis service not found
- job for redis-server.service failed because a timeout was exceeded
- failed to start redis-server.service unit redis-server.service is masked
Switch & save up to 80%
Dragonfly is fully compatible with the Redis ecosystem and requires no code changes to implement. Instantly experience up to a 25X boost in performance and 80% reduction in cost