0

I have a similar problem to that of the user who posted High memory usage of WordPress hosted on DreamHost VPS. The reason this is a 'problem' is because when it maxes out the memory quota I set for my VPS it will begin serving 503 error pages for 'uncached' pages (I guess?). Setting the quota higher does help, but I thought nginx would save me some money as well as provide better performance and less memory usage than Apache (especially) and lighttpd. One of my sites is simply an HTML-only website, and the other is a Wordpress website almost nobody looks at / extremely low traffic. I don't get it. I have the quota set to something like 512MB or 640MB RAM just to have it running decently.

Does anyone have any ideas as to what I could do to make nginx run more efficiently, or why I am having this problem?

Thanks!

2
  • And how did you tune nginx and PHP? Nov 6, 2012 at 23:41
  • Honestly, I didn't do much. I got a VPS without Apache, and installed nginx just like that via SSH and root.
    – BlueToast
    Nov 7, 2012 at 4:06

1 Answer 1

1

You must put all domains under the same ftp user, like they say in the wiki.

When using Nginx a set number of PHP processes are started up for every user a domain is hosted under. The same number are started regardless of how many domains are hosted for it. As such, if you have 10 domains spread across 10 separate FTP users you'll get 10x as many PHP processes as you would otherwise get. So, if Nginx is starting up 5 PHP processes, you would end up with 50, which would eat up a considerable amount of memory. The best configuration when using Nginx is to consolidate your domains under one FTP user. You should definitely do this prior to switching to Nginx.

http://wiki.dreamhost.com/Nginx

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .