UPDATE: I have solved the problem,from the log, I saw that the db was opening and closing frequently. I had put the redis creation in a for loop. So...foolish question,if anyone's log like me, check for looping.
I tried shutting it down and restarting, but it still happened. Here's the error message:
redis.exceptions.ConnectionError: Error 99 connecting localhost:6379. Cannot assign requested address.
I was trying to insert 300000 records into redis (my memory is big enough). But after I inserted about 30000 record in it,then an error occurs:
redis.exceptions.ConnectionError: Error 99 connecting localhost:6379. Cannot assign requested address.
After looking at the log file,it looks like the redis closed after I successful insert 30000 records into it.
the following is some part of my logfile:
[32176] 11 Jun 20:59:27 - Accepted 127.0.0.1:36578
[32176] 11 Jun 20:59:27 - Client closed connection
[32176] 11 Jun 20:59:27 - Accepted 127.0.0.1:52327
[32176] 11 Jun 20:59:27 - Client closed connection
[32176] 11 Jun 20:59:27 - Accepted 127.0.0.1:52367
[32176] 11 Jun 20:59:27 - Client closed connection
[32176] 11 Jun 20:59:27 - Accepted 127.0.0.1:52368
[32176] 11 Jun 20:59:27 - Client closed connection
[32176] 11 Jun 20:59:27 - Accepted 127.0.0.1:52369
[32176] 11 Jun 20:59:27 - Client closed connection
[32176] 11 Jun 20:59:27 - Accepted 127.0.0.1:52370
[32176] 11 Jun 20:59:27 - Client closed connection
[32176] 11 Jun 20:59:28 - DB 6: 28226 keys (0 volatile) in 32768 slots HT.
[32176] 11 Jun 20:59:28 - 0 clients connected (0 slaves), 9181112 bytes in use
[32176] 11 Jun 20:59:33 - DB 6: 28226 keys (0 volatile) in 32768 slots HT.
[32176] 11 Jun 20:59:33 - 0 clients connected (0 slaves), 9181112 bytes in use
[32176] 11 Jun 20:59:38 - DB 6: 28226 keys (0 volatile) in 32768 slots HT.
[32176] 11 Jun 20:59:38 - 0 clients connected (0 slaves), 9181112 bytes in use
[32176] 11 Jun 20:59:43 - DB 6: 28226 keys (0 volatile) in 32768 slots HT.
[32176] 11 Jun 20:59:43 - 0 clients connected (0 slaves), 9181112 bytes in use