宕机前的错误消息:posix_memalign(16,4096)失败(12:无法分配内存)

我有一台运行在Gunicorn和Nginx之上的Django服务器,昨天晚上我经历了一小段时间的停机。 重新启动Nginx和Gunicorn后,服务器恢复正常,但我无法弄清楚是什么导致了中断。 检查日志概述了问题发生的地方:首先,大约有100行:

2014/03/04 15:48:47 [emerg] 21790#0: *19536658 posix_memalign(16, 4096) failed (12: Cannot allocate memory), client: xx.xx.xx.xx, server: www.mysite.com, request: "GET /static/images/loading.gif HTTP/1.1", host: "www.mysite.com" 

然后,实际的错误来了。 这其中约有300个:

 2014/03/04 15:49:04 [error] 21790#0: *19532341 connect() failed (110: Connection timed out) while connecting to upstream, client: xx.xx.xx.xx, server: www.mysite.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8081/", host: "www.mysite.com" 

…和其中约100个:

 2014/03/04 15:51:32 [error] 21789#0: *19529583 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: xx.xx.xx.xx, server: www.mysite.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8081/", host: "www.mysite.com" 

…以及其中一些在整个日志中peppered:

 2014/03/04 15:51:22 [emerg] 21791#0: *19539287 malloc(1024) failed (12: Cannot allocate memory) while waiting for request, client: xx.xx.xx.xx, server: 0.0.0.0:80 

至于Django的错误日志,我收到了很多错误消息:

 OperationalError: could not fork new process for connection: Cannot allocate memory 

这看起来像某种内存不足的错误,但当时我的交换是完全空的,我没有看到任何日志中的任何内容,build议任何进程被杀害。 任何人都可以点亮这里可能发生的事情吗?