저는 장고 프로젝트에서 샐러리의 중개인으로 redis를 사용하고 있습니다. 배포 프로세스의 일환으로 서비스를 다시 시작합니다. 즉, redis, 셀러리, gunicorn (django) 등은 다시 시작합니다. 그러나 redis가 종료되지 않는 문제가 발생합니다.redis를 재시작하는 데 오랜 시간이 걸립니다.
$ sudo systemctl restart redis
$
그리고 15 분 동안 글을 쓰다가 멈 춥니 다. journalctl
는 (로그 내가 가정 하룻밤 회전 한) 어떤 항목을 보여줍니다, systemctl status
은 SIG (기간)를 비활성화로 레디 스 유닛을 표시하지만 이외의 그 무엇을하고 있는지 전혀 표시 :
May 24 10:31:22 staging systemd[1]: Stopping Advanced key-value store...
May 24 10:31:22 staging run-parts[305]: run-parts: executing /etc/redis/redis-server.pre-down.d/00_example
나는 SIG-용어 레디 스를 허용 이해하지 정상적으로 나가기 위해 셀러리가 작업을 수행하는지 또는 장고 서버가 액세스하고 있는지 궁금해하지만 그 서비스를 중단 한 상태에서 여전히 중단되었습니다. 상태를 확인할 수있는 위치/수행중인 작업을 알지 못하는 곳이 있습니까?
편집 :
31602:M 24 May 10:59:56.097 * 1 changes in 900 seconds. Saving...
31602:M 24 May 10:59:56.101 * Background saving started by pid 1151
1151:C 24 May 10:59:56.103 # Failed opening .rdb for saving: Read-only file system
31602:M 24 May 10:59:56.204 # Background saving error
I가 기본값을 사용하고 있습니다 : 아하, 확인 그래서 대신에 실제로 몇 가지 정보를 얻을 않는 /var/log/redis
를 기록, 실제로 기본적으로 systemd에 기록하지 않습니다 레디 스를 밝혀 dir
및 dbfilename
지시
그것은 레디 스에 의해이 소유는 왜 읽기 전용으로 설정 될 것이다 ..
# The filename where to dump the DB
dbfilename dump.rdb
# The working directory.
#
# The DB will be written inside this directory, with the filename specified
# above using the 'dbfilename' configuration directive.
#
# The Append Only File will also be created inside this directory.
#
# Note that you must specify a directory here, not a file name.
dir /var/lib/redis
[email protected]:/var/lib/redis$ ls -l
total 252
-rw-r--r-- 1 redis redis 249649 May 23 02:44 dump.rdb
?
확인 ... 그래서
[email protected]:/var/lib/redis$ redis-cli config get dir
1) "dir"
2) "/var/spool/cron"
[email protected]:/var/lib/redis$ redis-cli config get dbfilename
1) "dbfilename"
2) "root"
이 매우 이상하게 보일 시작합니다. 지구상에 무엇을 설정할 수 있었을까요?
왜 재 다이얼을 다시 시작했다고 생각하십니까? – e4c5
좋은 점은 현실이 아닐지 몰라도 변경하려는 생각이 들었습니다. 문제가 무엇인지 알아내는 것이 대부분입니다. – ptr
Redis는 캐시의 전체 내용을 디스크에 쓰려고합니다. 그런 다음 디스크에서 전체 캐시를 읽어야합니다. 느린 하드 드라이브에서 천천히 reall 수 있습니다 – e4c5