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'm not sure where the problem lies. I have:

centos 6 mysql php php-fpm wordpress (1 site).

this is a dedicated server i'm learning on.

as soon as i ran the web url the memory slammed to 125% of a 512k server, i had to upgrade to 1gig, so i'm not sure where the problem lies. I thought by switching to nginx from apache i would have more memory free, but i'm still stuck with the problem.

before launching the site with nginx and mysqld running the site was about 5% memory.

I reanamed my "my-small.cnf" to my.cnf and put in my /etc folder where the original was, but that seems not to have done it.

after looking at my TOP results, i'm starting to think it may be php-fpm eating my memory, but not sure.

is php-fpm the preferend way or is there something better to use. I read about possible memory leaks in php-fpm.

here is what i have:

php-fpm.conf

;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;

; All relative paths in this configuration file are relative to PHP's install
; prefix.

; Include one or more files. If glob(3) exists, it is used to include a bunch of
; files from a glob(3) pattern. This directive can be used everywhere in the
; file.
include=/etc/php-fpm.d/*.conf

;;;;;;;;;;;;;;;;;;
; Global Options ;
;;;;;;;;;;;;;;;;;;

[global]
; Pid file
; Default Value: none
pid = /var/run/php-fpm/php-fpm.pid

; Error log file
; Default Value: /var/log/php-fpm.log
error_log = /var/log/php-fpm/error.log

; Log level
; Possible Values: alert, error, warning, notice, debug
; Default Value: notice
;log_level = notice

; If this number of child processes exit with SIGSEGV or SIGBUS within the time
; interval set by emergency_restart_interval then FPM will restart. A value
; of '0' means 'Off'.
; Default Value: 0
;emergency_restart_threshold = 0

; Interval of time used by emergency_restart_interval to determine when 
; a graceful restart will be initiated.  This can be useful to work around
; accidental corruptions in an accelerator's shared memory.
; Available Units: s(econds), m(inutes), h(ours), or d(ays)
; Default Unit: seconds
; Default Value: 0
;emergency_restart_interval = 0

; Time limit for child processes to wait for a reaction on signals from master.
; Available units: s(econds), m(inutes), h(ours), or d(ays)
; Default Unit: seconds
; Default Value: 0
;process_control_timeout = 0

; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
; Default Value: yes
;daemonize = yes

;;;;;;;;;;;;;;;;;;;;
; Pool Definitions ; 
;;;;;;;;;;;;;;;;;;;;

; See /etc/php-fpm.d/*.conf


end php-fpm.conf

top

admin panel

gui-top

share|improve this question
    
possible duplicate of Nginx + PHP 5.3.3 (with php-fpm) - memory usage? –  Lucas Kauffman Mar 25 '12 at 18:56
    
read that already –  kb2tfa Mar 25 '12 at 18:59
    
So what did you learn from it? Did you try to lower your php memory values and the maximum amount of children? Wordpress is quite memory hungry as well. –  Lucas Kauffman Mar 25 '12 at 19:02
    
that's wiat i need to know, i wan't aware that wordpress was a memory hog. maybe that's my issue, becaue i've tried everything and nothing. only a php-fpm restart drops memory a bit, but children aren't high. –  kb2tfa Mar 25 '12 at 19:11
3  
That top output shows you've got a GB of memory free. It's useless for determining where you're using memory. Also, sort by memory usage (M) to find the heavy users. Finally, Virtuozzo sucks as a virtualisation platform for uncoordinated guests; don't expect this to be the last mysterious performance problem you have. –  womble Mar 25 '12 at 19:21

1 Answer 1

The best solution would be to add this line to your cronjob that will reload every 10-60 mins (CentOS):

/etc/init.d/php-fpm reload

I have heavy WP sites running on my networkcities.com network services which works pretty well.

share|improve this answer
    
Whut? Seriously? Reloading the fpm runner? Could it just be that the code's shit? –  Tom O'Connor Apr 15 '12 at 1:34

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.