Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


nginx processes
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

nginx processes

seraphkzseraphkz Member
edited November 2012 in General

Hey guys, So after editing /etc/nginx/nginx.conf and adding the line
worker_processes 1
I did a service nginx restart
But I still get 5 nginx processes. Does anyone know how I can fix this? It's taking up too much ram.

23905 root 20 0 29240 860 144 S 0.0 0.3 0:00.00 nginx 23906 www-data 22 0 29244 1156 428 S 0.0 0.4 0:00.00 nginx 23907 www-data 18 0 29244 1184 456 S 0.0 0.5 0:00.00 nginx 23908 www-data 18 0 29244 1284 464 S 0.0 0.5 0:00.00 nginx 23909 www-data 20 0 29244 1236 416 S 0.0 0.5 0:00.00 nginx

Comments

  • Try rebooting? Sometimes it derps like that.

  • Already rebooted. Same problem =\

  • edited November 2012

    What is the output of:

    ps ax -o pid,ppid,user,command | egrep '(nginx|PID)'

    Also did you compile from source?

  • seraphkzseraphkz Member
    edited November 2012

    @ShardHost

    PID PPID USER %CPU VSZ WCHAN COMMAND 26338 1 root 0.0 29240 rt_sig nginx: master process /usr/sbin/nginx 26339 26338 www-data 0.0 29244 - nginx: worker process 26340 26338 www-data 0.0 29244 - nginx: cache manager process 26344 19528 root 0.0 1768 - egrep (nginx|PID)

    Ah I see, only one worker process. It's just that.. My nginx/mysql (with innodb disabled) is at 100mb right now. I remember when I had a LNMP set up before, it was around 60mb.

  • edited November 2012

    @seraphkz said: Ah I see, only one worker process. It's just that.. My nginx/mysql (with innodb disabled) is at 100mb right now. I remember when I had a LNMP set up before, it was around 60mb.

    Before we get into the nitty gritty, are there any differences in environment? Did you make any additional configuration changes before that you haven't now?

  • Simply the cache manager from what the ax -o command shows.

    Everything looks to be alright to me, hm.

  • Is the cache manager worth the extra RAM? Or should I disable it?

  • If you didn't configure it, it's not even supposed to show up - definitely not default.

    Upto you to decide if you have any real use for it, though.

  • A couple things come to mind:

    1) Nginx isn't reading from the correct nginx.conf location.
    2) The config was not actually reloaded
    3) The init script you have installed is not pertains to the correct PID (check init script, and where the pid path actually is), this may cause #2

    In most situations calling the binary directly does the trick, such as using
    nginx -s reload
    nginx -s restart

    instead of
    service nginx reload
    service nginx restart

    The latter will not work, if the pid path in the init script is not correctly pointed to the actual nginx.pid, a common mistake in various installations.

  • PS: What's your nginx -V (capital V) output, that will show all your configured paths etc.

  • Thanks everyone for the help. I have pretty much found the problem. I don't know why the nginx cache was on by default. Disabled it, and now it's sitting at 60mb. Thanks again!

  • @seraphkz Can you pm me how did you disabled the cache process? I have the same problem. Thanks.

  • @juan, I actually just used minstall script with
    bash minstall.sh http-configure-nginx

  • @seraphkz thats explain why it turn on ... you must've said yes when minstall ask about enabling nginx cache (or you just simply enter).

    i do have nginx cache enable, but my nginx never use that much of memory ... possibly because there is nobody using it except for myself.

Sign In or Register to comment.