Zend Enabler error Error: Could not locate a free PHP proces

General discussion forum for the Zend Server - The full, commercial edition

Re: Zend Enabler error Error: Could not locate a free PHP proces

Postby mattsouthall on Thu Feb 24, 2011 4:38 pm

I'm noticing now that this is the Zend Server forum, not the Zend Server Community Edition forum - however this is obviously a very similar, if not identical issue, to the one mentioned above.

Should I be re-posting this in the Community Edition forum? I don't know if this is one of those places where people are a bit more flexible, or if I'll just get ignored for not pressing all the levers in the correct order :)
mattsouthall
 
Posts: 7
Joined: Wed Feb 23, 2011 5:16 pm

Re: Zend Enabler error Error: Could not locate a free PHP proces

Postby idobms on Thu Feb 24, 2011 9:51 pm

One thing to try is to see if you get this errors after you disable the Optimizer+ extension. Also do you actually see that the processes are hung and will not process any more requests? It is very difficult to know why the php-cgi processes are hanging without getting a memory dump from the time of the hang. One problem that can occur mainly in Windows 2003 is the system running out of desktop heap and the new fast cgi processes cannot be created successfully. That is influenced by the number of running processes. You can check that using the MSFT desktop heap monitor or try to limit the number of fast cgi processes in the enabler ini configuration file. It depends on your registry settings but with the defaults (that were later changed in Win2008) can sometimes occur if you have more than 30-40 php-cgi's.
User avatar
idobms
 
Posts: 90
Joined: Thu Nov 05, 2009 1:18 am

Re: Zend Enabler error Error: Could not locate a free PHP proces

Postby jachimcoudenys on Tue Mar 01, 2011 9:02 am

The mmap_base approach is not working and the server is still going down.

I cannot disable the Zend Optimizer+, because the site gets 4 to 5 times slower.

The only setting I can find the ZendEnablerConf.xml is:
Code: Select all
<ProcessCount start="2" extra="8"/>
jachimcoudenys
 
Posts: 6
Joined: Tue Feb 03, 2009 9:26 am

Re: Zend Enabler error Error: Could not locate a free PHP proces

Postby idobms on Mon Mar 07, 2011 8:12 pm

Ok in this case I would increase the number of fastcgi processes. It looks like you have only 2 by default and 8 extra so if you happen to process more than 10 requests you can get queued and more than 2 will cause process to be created and destroyed all the time. Try increasing the numbers to about 10 and 10 or try a bit higher if you process more requests in parallel. You will have 10 handlers running and an extra 10 that will be launched if there are no more processes available.
The mmap_base change is addressing a memory allocation issue.
User avatar
idobms
 
Posts: 90
Joined: Thu Nov 05, 2009 1:18 am

Re: Zend Enabler error Error: Could not locate a free PHP pr

Postby dennislan on Fri Sep 30, 2011 6:59 am

I Have the same problems.

OS: Windows 2003 Server R2 (v 5.2.3790)
CPU: 16ps
Mem: 8GB
Server: Zend Servce CE 5.0.3 (not 4.x)

I Had refer to http://kb.zend.com/index.php?View=entry&EntryID=454 and dispable the Zend Optimizer+ like this:
Code: Select all
;zend_extension_manager.dir.optimizerplus=[..]


I restart Apache Server and foud the issue again: (C:\Program Files\ZendServer\log\ZendEnabler.log)

Code: Select all
...
Error: Could not locate a free PHP process from the "application/x-httpd-php" pool within the 'Connection Timeout'.
Error: Request timed out during the communication with the PHP process.
...


Anyone can help me?
thks & BR.
dennislan
 
Posts: 6
Joined: Tue Mar 23, 2010 8:02 am

Re: Zend Enabler error Error: Could not locate a free PHP pr

Postby dennislan on Fri Sep 30, 2011 7:02 am

add. info:
sometimes the zendserver will not response and not parse php file request .
when request a http://xxxx/index.php will diplay download dialog
dennislan
 
Posts: 6
Joined: Tue Mar 23, 2010 8:02 am

Re: Zend Enabler error Error: Could not locate a free PHP pr

Postby gravityshock on Fri Sep 30, 2011 8:30 am

Maybe a solution, maybe not:

We had two problems on a Windows Server 2003. One is the discused Problem with Zend Enabler the second is a connection problem to an oracle database that occurse sometimes. We worked on both problems seperatly. For the Zend Problem we testet many solutions, incl. increasing the Threads. Nothing worked. On the other side we changed some registry values to fix the oracle problem. Since then the zend enabler problem didn't show up again. Maybe Zend had have the same problem as the oracle instant client.

The problem for the instant client was, that we had to many processes for a to small desktop-heap. We just increased the desktop heap for not interactive clients:

Regkey: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SubSystems
Value: SharedSection=1024,20480,1024
MS-kb: http://support.microsoft.com/kb/126962/en
gravityshock
 
Posts: 11
Joined: Tue Oct 27, 2009 1:47 pm

Re: Zend Enabler error Error: Could not locate a free PHP pr

Postby idobms on Fri Sep 30, 2011 8:23 pm

There are a few scenarios that can lead to this error which basically means that there is no free process to handle the request. On Windows 2003 Server, the desktop heap is limited and cannot support too many apache fcgi processes. To validate this issue you can run the Desktop heap monitor from MSFT and you will see that you are maxed out on desktop heap. This is not memory or address space in the process so you cannot see it in most performance monitors. Win2008 Server increased the default and can usually accommodate over 40-60 fcgi processes though it might occur with a larger number of processes and then you will need to increase the “HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SubSystems SharedSection” value.

In cases where the desktop heap is not maxed out you can get this error when you just do not have enough processes defined to handle the load and in that case you can increase the number of handlers in the configuration file as mentioned in the posts above. Other reasons can be long timeouts or very long transactions that occupy the fcgi processes or an error that causes the processes to hang. It really depends on the scenario. If the transactions or timeouts are too long after some time your processes will become free again when load decreases. If they are hung then they will never return and this condition will remain even when load drops.
User avatar
idobms
 
Posts: 90
Joined: Thu Nov 05, 2009 1:18 am

Re: Zend Enabler error Error: Could not locate a free PHP pr

Postby printpac on Mon Oct 03, 2011 9:58 am

Has any one found a solution or a cause, cause my friend seems to have the same issue and he can't seem to fix it! At some point one PHP process is starting to use more and more memory, until the server almost crashes.
printpac
 
Posts: 2
Joined: Mon Oct 03, 2011 9:52 am
Location: Dublin

Re: Zend Enabler error Error: Could not locate a free PHP pr

Postby idobms on Tue Oct 11, 2011 3:56 am

The desktop heap problem is not related to one process or memory consumption. The desktop heap is a dedicated system heap with a size defined in the registry and it is shared between all processes on a desktop (or ” Windows station”) so the problem manifests itself when too many processes are launched at the same time. The solution is increasing the size of the buffer allocated for the desktop heap. The memory utilization of a single process is not the factor in this case. There are many possible causes for this including resources consumed by the code itself or possibly a memory leak in one of the extensions you are using.
User avatar
idobms
 
Posts: 90
Joined: Thu Nov 05, 2009 1:18 am

PreviousNext

Return to Zend Server

Who is online

Users browsing this forum: No registered users and 3 guests