{solve} redis:localhost:6379。无法分配请求的地址

时间:2012-06-11 13:17:04

标签: python redis

更新:我已经解决了问题,从日志中,我看到数据库经常打开和关闭。我把redis创建放在for循环中。所以...愚蠢的问题,如果有人像我一样登录,请检查循环。

我尝试关闭它并重新启动,但它仍然发生了。这是错误消息:

redis.exceptions.ConnectionError:错误99连接localhost:6379。无法分配请求的地址。

我试图在redis中插入300000条记录(我的记忆足够大)。但是在我插入了大约30000条记录后,就会出现错误:

  redis.exceptions.ConnectionError: Error 99 connecting localhost:6379. Cannot assign   requested address.

查看日志文件后,在成功插入30000条记录后,看起来redis已关闭。

以下是我的日志文件的一部分:

[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

0 个答案:

没有答案