首页 > 解决方案 > redis 启动错误“redis-server.service 的作业失败,因为超出了配置的资源限制。”

问题描述

如何解决这个问题?你可以在这里查看 我尝试在我的 nginx 上启动 redis-server。它在下面向我显示了这个错误。

我只是跟着这个,但它对我不起作用。

我不知道如何解决它。

root@li917-222:~# service redis restart
Job for redis-server.service failed because a configured resource limit was exceeded. See "systemctl status redis-server.service" and "journalctl -xe" for details.
root@li917-222:~# systemctl status redis-server.service
● redis-server.service - Advanced key-value store
   Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
   Active: failed (Result: start-limit-hit) since Thu 2021-07-01 13:29:01 UTC; 39s ago
     Docs: http://redis.io/documentation,
           man:redis-server(1)
  Process: 13798 ExecStopPost=/bin/run-parts --verbose /etc/redis/redis-server.post-down.d (code=exited, status=0/SUCCESS)
  Process: 13794 ExecStop=/bin/kill -s TERM $MAINPID (code=exited, status=0/SUCCESS)
  Process: 13789 ExecStop=/bin/run-parts --verbose /etc/redis/redis-server.pre-down.d (code=exited, status=0/SUCCESS)
  Process: 13784 ExecStartPost=/bin/run-parts --verbose /etc/redis/redis-server.post-up.d (code=exited, status=0/SUCCESS)
  Process: 13781 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exited, status=0/SUCCESS)
  Process: 13776 ExecStartPre=/bin/run-parts --verbose /etc/redis/redis-server.pre-up.d (code=exited, status=0/SUCCESS)

Jul 01 13:29:01 li917-222 systemd[1]: redis-server.service: Unit entered failed state.
Jul 01 13:29:01 li917-222 systemd[1]: redis-server.service: Failed with result 'resources'.
Jul 01 13:29:01 li917-222 systemd[1]: redis-server.service: Service hold-off time over, scheduling restart.
Jul 01 13:29:01 li917-222 systemd[1]: Stopped Advanced key-value store.
Jul 01 13:29:01 li917-222 systemd[1]: redis-server.service: Start request repeated too quickly.
Jul 01 13:29:01 li917-222 systemd[1]: Failed to start Advanced key-value store.
Jul 01 13:29:01 li917-222 systemd[1]: redis-server.service: Unit entered failed state.
Jul 01 13:29:01 li917-222 systemd[1]: redis-server.service: Failed with result 'start-limit-hit'.
root@li917-222:~# ExecStart=/usr/bin/redis-server /etc/redis/redis.conf --supervised systemd
/etc/redis/redis.conf: line 42: daemonize: command not found
/etc/redis/redis.conf: line 46: pidfile: command not found
/etc/redis/redis.conf: line 50: port: command not found
/etc/redis/redis.conf: line 59: tcp-backlog: command not found
/etc/redis/redis.conf: line 69: bind: warning: line editing not enabled
Try 'timeout --help' for more information.
/etc/redis/redis.conf: line 95: tcp-keepalive: command not found
/etc/redis/redis.conf: line 103: loglevel: command not found
/etc/redis/redis.conf: line 108: logfile: command not found
/etc/redis/redis.conf: line 123: databases: command not found
/etc/redis/redis.conf: line 147: save: command not found
/etc/redis/redis.conf: line 148: save: command not found
/etc/redis/redis.conf: line 149: save: command not found
/etc/redis/redis.conf: line 164: stop-writes-on-bgsave-error: command not found
/etc/redis/redis.conf: line 170: rdbcompression: command not found
/etc/redis/redis.conf: line 179: rdbchecksum: command not found
/etc/redis/redis.conf: line 182: dbfilename: command not found
backup.db  dump.rdb  exp.so  root
/etc/redis/redis.conf: line 230: slave-serve-stale-data: command not found

标签: nginxredisredis-server

解决方案


推荐阅读