0

I recently got vps with 512MB ram. I install nginx 1.2.4 with ph5-fpm and a simple wordpress installation . I currently have no traffic as its in development mode.But still It shows 495MB used and 80% of 495 is used by php5-fpm.

What could be the issue to cure this,As in apache i didn't have any problem like this.

From the first website loading php5-fpm memory usage started to increase.

I tried memory showing using python script by http://www.pixelbeat.org/scripts/ps_mem.py

It shows that max ram is used by php5-fpm.

Suggest me a way so that, my site can handle traffic as wordpress use too much resources but not this much.

5
  • Post your nginx config, php-fpm config and top output during the peak. You may want to use something like pastebin for conservation of question space. Commented Jan 20, 2013 at 19:14
  • @Grumpy here is link pastebin.com/wSZyZ3TE Help me to sort out the issue. Thanks Commented Jan 21, 2013 at 13:12
  • (1) Your keepalivetimeout is uselessly long. Try something like 5. (2) you actually didn't include any relevant section for your php-fpm. Your relevant config is in /etc/php5/fpm/pool.d/*.conf and that's not top. Type top in shell and paste ALL of it. Commented Jan 21, 2013 at 19:07
  • @Grumpy hi, i updated with the www.conf in pool.d dir in fpm the link is pastebin.com/L0p1wC6c thanks for your help, i really appreciate it. Commented Jan 21, 2013 at 20:08
  • I see you have yet to follow up from my answer. Update your www.conf to the values I outlined in the answer previously and then post your top -- which you still not have. Commented Jan 22, 2013 at 4:36

1 Answer 1

1

A 512MB ram is tiny, expectations of running a "large traffic" is illogical.

Because you provided nearly no details other than how much ram your php-fpm uses on idle... I can only really suggest one thing. Try setting a lower pm.max_requests value in php-fpm settings. Like...

pm.max_requests = 100 pm.max_children = 5 

If you want to understand the php-fpm settings in more detail, you can look at this post.

3
  • yeah correct i didn't specified other parameters. also as stated in case of apache2 i could handle much more traffic than in this case.Sometimes only few processing lead to out of memory error.And i am not able to figure it out, whats the problem. Commented Jan 20, 2013 at 13:20
  • hi i changed the max request and max children to what you stated, but, there is no effect, the website still have no traffic. if it has, there it shows only minor change. here are values from top pastebin.com/f4uBb4JT Hope you can see that php5-fpm is taking ram much than expected. Commented Jan 22, 2013 at 12:18
  • @AbhishekGahlot You need to restart php-fpm (service php-fpm restart) anytime you change your configuration. I see that you have not. Additionally, when including top, don't strip out the stuff on the top. Commented Jan 23, 2013 at 0:18

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.