環境
——————————————————
VMware Fusion下CentOS7 x64 虛擬機,4GB內存,300GB硬碟,i5 CPU x 2
Nginx 1.9.6 使用./configure方式安裝
Nginx-gridfs latest 使用clone git repo方式安裝
MongoDB 3.0.7 使用yum方式安裝,使用gfs資料庫
問題描述
——————————————————
上傳檔案後,瀏覽器中請求:http://<nginx server ip>:< ;port>/gfs/<my file> 瀏覽器出現「無法開啟頁面」的錯誤,查看錯誤日誌,http error code 500。 error.log中顯示:
malloc(18446744056529682432) failed (12: Cannot allocate memory), client: <Client IP>, server: localhost, request: "GET /gfs/test2.ip;, server: localhost, request: "GET /gfs/test2.zip HTTP/1. : "<Nginx server IP>"
一些配置
——————————————————
ulimit -n:
65535
free -h:
Mem: total: 3.7G | used: 885M | free: 2.0G | shared: 11M | buff/cache: 881M | available: 2.6G
Swap: total: 2.0G| used: 0B | free 2.0G
nginx -V:
configure arguments: --prefix=/usr/local/nginx --add-module=/usr/local/nginx-gridfs --with-openssl=/usr/include/openssl
nginx-conf:
worker_processes 1;
events {
worker_connections 65535;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 8001;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location /gfs/ {
gridfs gfs field=filename type=string;
mongo <MongoDB IP>:27017;
}
}
}
此問題何解?謝謝!
親,這個問題你解決了?