Docker容器中Redis无征兆因SIGTERM终止问题求助
Redis容器无征兆因SIGTERM终止问题排查
这可能是某旧帖的延伸,但该帖发布已超2年,推测是不同问题。我使用官方redis镜像连接Web服务器,以下是我的docker-compose配置:
version: '3' services: ... session-store: image: redis ports: - 6379:6379 restart: on-failure networks: - babylon command: /bin/sh -c "redis-server --requirepass $$REDIS_PASS" container_name: 'session-store' environment: - REDIS_PASS=<pass> ...
运行一段时间后,Redis无征兆因SIGTERM终止,日志如下:
9:C 10 May 2024 15:14:37.012 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo 9:C 10 May 2024 15:14:37.012 * Redis version=7.2.4, bits=64, commit=00000000, modified=0, pid=9, just started 9:C 10 May 2024 15:14:37.012 * Configuration loaded 9:M 10 May 2024 15:14:37.012 * monotonic clock: POSIX clock_gettime 9:M 10 May 2024 15:14:37.013 * Running mode=standalone, port=6379. 9:M 10 May 2024 15:14:37.013 * Server initialized 9:M 10 May 2024 15:14:37.013 * Ready to accept connections tcp 9:M 10 May 2024 16:14:38.076 * 1 changes in 3600 seconds. Saving... 9:M 10 May 2024 16:14:38.077 * Background saving started by pid 14 14:C 10 May 2024 16:14:38.099 * DB saved on disk 14:C 10 May 2024 16:14:38.101 * Fork CoW for RDB: current 0 MB, peak 0 MB, average 0 MB 9:M 10 May 2024 16:14:38.178 * Background saving terminated with success 9:signal-handler (1715364019) Received SIGTERM scheduling shutdown... 9:M 10 May 2024 18:00:19.541 * User requested shutdown... 9:M 10 May 2024 18:00:19.541 * Saving the final RDB snapshot before exiting. 9:M 10 May 2024 18:00:19.557 * DB saved on disk 9:M 10 May 2024 18:00:19.557 # Redis is now ready to exit, bye bye...
我已在网上搜索解决方案,但大多需要修改文件系统中的服务类型配置。由于我使用的是官方Docker镜像,理应已有正确配置,请问有人遇到过此问题并找到解决办法吗?
内容的提问来源于stack exchange,提问作者Andy95
相关产品推荐
相关产品推荐

