我在openshift上运行python应用程序,redis作为数据存储。
过去几天该应用已停止工作
当我通过邮递员向我的应用程序发送请求时,我看到:
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /index.
Reason: Error reading from remote server
当我登录我的应用时:
$ rhc tail myapp
我明白了:
==> app-root/logs/python.log <==
[Sat Aug 22 18:19:29 2015] [error] \t\t\t\tvalid = true;\r
[Sat Aug 22 18:19:29 2015] [error] \t\t\t}\r
[Sat Aug 22 18:19:29 2015] [error] \t\t}\r
[Sat Aug 22 18:19:29 2015] [error] \t}\r
(98)Address already in use: make_sock: could not bind to address 127.2.78.1:8080
no listening sockets available, shutting down
Unable to open logs
(98)Address already in use: make_sock: could not bind to address 127.2.78.1:8080
no listening sockets available, shutting down
Unable to open logs
==> redis/logs/redis.log <==
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
[133622] 25 Aug 12:04:29.516 # Server started, Redis version 2.6.13
[133622] 25 Aug 12:04:29.516 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory =
1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
[133622] 25 Aug 12:04:29.516 * DB loaded from disk: 0.000 seconds
[133622] 25 Aug 12:04:29.516 * The server is now ready to accept connections on port 6379
同样,这个应用程序一直运行良好,几周没有错误。认为我的“爱好”redis db已经满了,我尝试了flushall,但问题仍然存在。
我该如何解决这个问题?
编辑:
[133622] 25 Aug 13:22:52.715 # User requested shutdown...
[133622] 25 Aug 13:22:52.715 * Saving the final RDB snapshot before exiting.
[133622] 25 Aug 13:22:52.735 * DB saved on disk
[133622] 25 Aug 13:22:52.735 * Removing the pid file.
[133622] 25 Aug 13:22:52.735 # Redis is now ready to exit, bye bye...
[394414] 25 Aug 13:22:52.830 * Max number of open files set to 10032
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 2.6.13 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in stand alone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 394414
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
[394414] 25 Aug 13:22:52.834 # Server started, Redis version 2.6.13
[394414] 25 Aug 13:22:52.834 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory =
1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
[394414] 25 Aug 13:22:52.834 * DB loaded from disk: 0.000 seconds
[394414] 25 Aug 13:22:52.834 * The server is now ready to accept connections on port 6379