Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
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. –  Grumpy Jan 20 '13 at 19:14
    
@Grumpy here is link pastebin.com/wSZyZ3TE Help me to sort out the issue. Thanks –  Abhishek Jan 21 '13 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. –  Grumpy Jan 21 '13 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. –  Abhishek Jan 21 '13 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. –  Grumpy Jan 22 '13 at 4:36

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
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. –  Abhishek Jan 20 '13 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. –  Abhishek Jan 22 '13 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. –  Grumpy Jan 23 '13 at 0:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.