如果有人可以提供反馈或指出正确的方向,我将不胜感激。当三个 django 站点以守护程序模式运行时,我无法在远程服务器上执行任何终端命令。当我在一个或两个站点上使用嵌入式模式时,我没有问题。当我输入命令时,我只得到“-bash:fork:cannot allocate memory”。
系统:虚拟云上的 Ubuntu 8:04 LTS 远程,没有 SWAP 文件,但 512 RAM(免费,顶部和 pc aux 表明仅使用了 20% 的内存),使用 Putty 访问,使用 WINSCP 的 FTP,设置了 UFW 防火墙,Apache 2.2。 8、预分叉、mod-wsgi 2.3、sqlite db、
.conf 文件,截至目前,守护进程已被注释掉;
名称虚拟主机 *:80
头盔如下
<VirtualHost *>
ServerAdmin webmaster@facts.com
ServerName helme.h1.net
DocumentRoot /home/helme/django/facts/apache/
DirectoryIndex index.html index.htm
ServerAlias helme.h1.net www.helme.h1.net
<Directory /home/helme/django/facts/apache/>
Options Indexes FollowSymLinks
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
ErrorLog /home/helme/django/facts/log/error.log
LogLevel info
CustomLog /home/helme/django/facts/log/access.log common
#WSGIDaemonProcess helme.h1.net user=www-data group=www-data processes=5 threads=1
#WSGIProcessGroup helme.h1.net
WSGIScriptAlias / /home/helme/django/facts/apache/django.wsgi
<Directory /home/helme/django/facts/apache/>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
查理如下
<VirtualHost *>
ServerAdmin webmaster@facts-pte.com
ServerName facts-pte.h1.net
DocumentRoot /home/pte/django/facts/apache/
DirectoryIndex index.html index.htm
ServerAlias facts-pte.h1.net www.facts-pte.h1.net
<Directory /home/pte/django/facts/apache/>
Options Indexes FollowSymLinks
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
ErrorLog /home/pte/django/facts/log/error.log
LogLevel info
CustomLog /home/pte/django/facts/log/access.log common
#WSGIDaemonProcess facts-pte.h1.net user=www-data group=www-data processes=5 threads=1
#WSGIProcessGroup facts-pte.h1.net
WSGIScriptAlias / /home/pte/django/facts/apache/django.wsgi
<Directory /home/pte/django/facts/apache/apache/>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
如下
<VirtualHost *>
ServerAdmin webmaster@facts.com
ServerName wuest.h1.net
DocumentRoot /home/wuest/django/wuest/apache/
DirectoryIndex index.html index.htm
ServerAlias wuest.h1.net www.wuest.h1.net
<Directory /home/wuest/django/wuest/apache/>
Options Indexes FollowSymLinks
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
ErrorLog /home/wuest/django/wuest/log/error.log
LogLevel info
CustomLog /home/wuest/django/wuest/log/access.log common
WSGIDaemonProcess wuest.h1.net user=www-data group=www-data processes=5 threads=1
WSGIProcessGroup wuest.h1.net
WSGIScriptAlias / /home/wuest/django/wuest/apache/django.wsgi
<Directory /home/wuest/django/wuest/apache/>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
哪个内存满了?如果 Apaceh 被加载为 'worker' mpm 我会遇到同样的问题吗?是否像添加一个 SWAP 文件一样简单?安装 postgresql 时会有更多内存问题吗?
请注意,我不是高级程序员或管理员,只是为从事 Django 项目的朋友管理远程服务器。
任何帮助,将不胜感激。亲切的问候迈克尔