centos7 - memory overflow problem when deploying NGINX+MongoDB+GridFS file server?
PHPz
PHPz 2017-05-16 17:20:50
0
1
790

Environment
-----------------------
CentOS7 x64 virtual machine under VMware Fusion, 4GB memory, 300GB hard disk, i5 CPU x 2
Nginx 1.9.6 Use ./configure method to install
Nginx-gridfs latest Use clone git repo method to install
MongoDB 3.0.7 Use yum method to install, use gfs database

Problem description
----------------------
After uploading the file, the browser requests: http://<nginx server ip>:< ;port>/gfs/<my file> The browser encountered an error of "cannot open the page". Check the error log, http error code 500. The error.log shows:
malloc(18446744056529682432) failed (12: Cannot allocate memory), client: <Client IP>, server: localhost, request: "GET /gfs/test2.zip HTTP/1.1", host : "<Nginx server IP>"

Some configurations
------------------
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;        
        }
    }
}

What is the solution to this problem? Thanks!

PHPz
PHPz

学习是最好的投资!

reply all(1)
左手右手慢动作

Dear, have you solved this problem?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template