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

【字号: 日期:2022-07-12浏览:33作者:雯心

问题描述

环境------------------VMware Fusion下CentOS7 x64 虚拟机,4GB内存,300GB硬盘,i5 CPU x 2Nginx 1.9.6 使用./configure方式安装Nginx-gridfs latest 使用clone git repo方式安装MongoDB 3.0.7 使用yum方式安装,使用gfs数据库

问题描述------------------上传文件后,浏览器中请求:http://&lt;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.zip HTTP/1.1', host: '<Nginx server IP>'

一些配置------------------ ulimit -n:

65535

free -h:

Mem: total: 3.7G | used: 885M | free: 2.0G | shared: 11M | buff/cache: 881M | available: 2.6GSwap: 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; sendfileon; 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;} }}

此问题何解?谢谢!

问题解答

回答1:

亲,这个问题你解决了?

相关文章: