title: {solve}redis: localhost:6379. Cannot assign requested address
body: <p><strong>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.</strong></p>
  
  <p>I tried shutting it down and restarting, but it still happened. Here's the error message:</p>
  
  <p>redis.exceptions.ConnectionError: Error 99 connecting localhost:6379. Cannot assign   requested address.</p>
  
  <p>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:</p>
  
  <pre><code>  redis.exceptions.ConnectionError: Error 99 connecting localhost:6379. Cannot assign   requested address.
  </code></pre>
  
  <p>After looking at the log file,it looks like the redis closed after I successful insert 30000 records into it.</p>
  
  <p>the following is some part of my logfile:</p>
  
  <pre><code>[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
  </code></pre>