无法在POPEN命令分配内存 [英] Cannot allocate memory on Popen commands

查看:1435
本文介绍了无法在POPEN命令分配内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Ubuntu的服务器VPS 11.10 64位,有时当我执行命令subprocess.Popen我得到我得到太多这个错误:

I have a VPS server with Ubuntu 11.10 64bit and sometimes when I execute a subprocess.Popen command I get am getting too much this error:

OSERROR:[错误12]无法分配内存

OSError: [Errno 12] Cannot allocate memory

配置的详细信息:
对于每一个网站,我有一个Apache这样的网站: http://pastebin.com/mcew79sH
而且这样的设置和一个WSGI文件(包括比项目相同的文件夹): http://pastebin.com/hrrV4WTM

我传递的参数POPEN构造函数列表,并使用close_fds = TRUE,我也使用和标准输入/输出用管,我需要读取响应的人进行沟通。

I am passing the arguments to Popen constructor as a list and using close_fds=True, I am also using and stdin/stdout to communicate with PIPE for the ones which I need reading the response.

最后,这是回溯我得到时出现错误 http://pastebin.com/FqXPHwhq

Finally this is the traceback I get when the error appears http://pastebin.com/FqXPHwhq

服务器提供约25站点,小流量(可能其中5具有相当的日常使用),我的VPS RAM大小为1024MB个个执行PostgreSQL数据库。

The server is serving about 25 sites with small traffic (probably 5 of them has a considerable daily use) my VPS RAM size is 1024MB all of them execute PostgreSQL databases.

这一切开始时,我们迁移从VPS站点运行Ubuntu服务器10.10 32位到64位11.10。

All this started when we migrated the sites from a VPS running Ubuntu Server 10.10 32 Bit to 11.10 64Bit.

不知道如何解决这个问题?

Any idea how to solve this?

---- ----编辑

---- EDIT ----

的ps aux - > http://synsa.synsa.com/site_media/process.txt

ps aux --> http://synsa.synsa.com/site_media/process.txt

推荐答案

嗯,这很容易。听起来像它的时间来升级你的VPS或缩减的Postgres /阿帕奇/等的内存设置,并承担由此产生的性能损失。

Well that's easy. Sounds like it's time to upgrade your vps or scale back the memory settings of postgres/apache/etc and take the resulting performance hit.

这篇关于无法在POPEN命令分配内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆