#1  
Old 9th June 2013, 22:46
theCCstone theCCstone is offline
Junior Member
 
Join Date: Jun 2013
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default Nginx + php-fpm

Hello, I have a problem in the processes of php-fpm. I migrated from apache to nginx, however with nginx and php-fpm happens the following problem: php-fpm, even after closing the client connection, the process is still active in the system. Causing me to get the process of restarting php-fpm hourly. If anyone can help me, I'm grateful
Reply With Quote
The Following User Says Thank You to theCCstone For This Useful Post:
saosangmo (19th June 2013)
Sponsored Links
  #2  
Old 19th June 2013, 23:58
saosangmo saosangmo is offline
Junior Member
 
Join Date: Jun 2013
Posts: 1
Thanks: 2
Thanked 0 Times in 0 Posts
Default

hi theCCstone,
I'm newbie here and get the same problem. Did you find the solutions?
thanks
__________________
bien quang cao
Reply With Quote
  #3  
Old 26th June 2013, 15:17
levina85 levina85 is offline
Junior Member
 
Join Date: Jun 2013
Location: Ahmadabad, india
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am also having the same problem in Nginx. Were you able to find the solution to the issue?
__________________
New Generation Application Performance Monitoring and Tomcat Monitoring
Reply With Quote
  #4  
Old 2nd July 2013, 15:00
harkman harkman is offline
Junior Member
 
Join Date: Aug 2012
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm not a expert, but as far as I understand the system of nginx and php-fpm both maintain a pool of worker threads.

If you have multiple websites that use their own priviliges both services will start at minimum 1 process for each site, to serve incomming requests.

Starting new processes is very expensive in regards to processing time, therefore at least one worker process for each site should stay in the memory of the server, waiting for new requests.

If you kill those processes, you will only raise the response time of your websites.

Regards, Jrgen

Last edited by harkman; 2nd July 2013 at 15:01. Reason: typo
Reply With Quote
  #5  
Old 9th July 2013, 02:56
theCCstone theCCstone is offline
Junior Member
 
Join Date: Jun 2013
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default Nginx + php-fpm

Their placement is correct. My problem is that in addition to the standard thread. When more than one person accesses the website, it does not return to the default one processor, it is with the other assets in the memory accesses, slowly consuming all system memory. Thus it becomes impossible to use. If anyone knows anything, please help (:
Reply With Quote
  #6  
Old 9th July 2013, 20:00
pititis pititis is offline
Senior Member
 
Join Date: Dec 2010
Location: Mnchen
Posts: 364
Thanks: 38
Thanked 86 Times in 68 Posts
Default

The solution is use ondemand mode in each pool configuration.

Change:

pm = dynamic (or pm = static)

for

pm = ondemand

and restart fpm.

ondemand mode needs (PHP Version >= 5.3.9)

Also see the pm.max_children and pm.process_idle_timeout directives if you choose ondemand mode

Code:
;  ondemand - no children are created at startup. Children will be forked when
;             new requests will connect. The following parameter are used:
;             pm.max_children           - the maximum number of children that
;                                         can be alive at the same time.
;             pm.process_idle_timeout   - The number of seconds after which
;                                         an idle process will be killed.
Cheers!
Reply With Quote
  #7  
Old 10th July 2013, 03:02
theCCstone theCCstone is offline
Junior Member
 
Join Date: Jun 2013
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default

Thank you. Worked perfectly now = D
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Only Problems since Updating from 3.0.3.3 to 3.0.4.1 mbay General 4 17th May 2012 12:56
ubuntu and nginx delgado2061 Installation/Configuration 0 27th November 2011 23:36
Problem with services!! banzaiwebstudio.com Installation/Configuration 7 19th May 2010 21:13
Unable to install ISPConfig bdonecker Installation/Configuration 21 26th May 2009 08:20
Apache2 Freezes celtic Server Operation 31 28th May 2007 17:18


All times are GMT +2. The time now is 12:53.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.