gridfs http文件服务器,部署NGINX+MongoDB+GridFS文件服务器出现的内存溢出问题?

环境

------------------

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>:/gfs/ 浏览器出现“无法打开页面”的错误,查看错误日志,http error code 500。error.log中显示:

malloc(18446744056529682432) failed (12: Cannot allocate memory), client: , server: localhost, request: "GET /gfs/test2.zip HTTP/1.1", host: ""

一些配置

------------------

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 :27017;

}

}

}

此问题何解?谢谢!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值