[mapguide-users] RE: Studio Enterprise and Web Studio Cannot Connect Randomly

Trevor Wekel trevor.wekel at autodesk.com
Thu Nov 16 19:31:45 EST 2006


Hi Jason,
 
Does setting StartServers = MaxServers eliminate the connection errors?
 
Here's some more background on the IIS FastCGI extension.
Isapi_fcgi.dll does recycle the processes.  Memory leaks will accumulate
for a while but resource consuming php-cgi.exe and mapagent.exe
processes should drop off after a while.  The only catch is that
isapi_fcgi gives no control over how long the processes should stay
alive.  For PHP, setting the following environment variables may help
roll the processes a little quicker:
 
PHP_FCGI_MAX_REQUESTS=500
PHP_FCGI_CHILDREN=1
 
These can be set by adding a registry setting under FASTCGI/.php
Environment REG_BINARY (0x0D delimited set of environment variables,
terminated with 0x00)
 
eg.  PHP_FCGI_MAX_REQUESTS=500 0x0D PHP_FCGI_CHILDREN=1 0x0D 0x00
 
Thanks,
Trevor
 

  _____  

From: Jason Birch [mailto:Jason.Birch at nanaimo.ca] 
Sent: Thursday, November 16, 2006 5:12 PM
To: users at mapguide.osgeo.org
Cc: Trevor Wekel
Subject: RE: [mapguide-users] RE: Studio Enterprise and Web Studio
Cannot Connect Randomly


For anyone who's keeping track...
 
Setting the StartServers to a higher number did not seem to help me.
 
What has seemed to help was setting the StartServers and MaxServers to
the same number.  I guess this is OK if you're not worried about memory
leaks or dynamic resource allocation on your server.
 
It looks to me like any time a MapAgent child process is killed on
Windows, the FastCGI ISAPI handler doesn't get informed about it, and
the first request fails. If you restart IIS after killing a process, you
don't get the error; a new process is just started up.
 
Jason

  _____  

From: Jason Birch [mailto:Jason.Birch at nanaimo.ca] 
Sent: Wednesday, November 15, 2006 12:41
To: users at mapguide.osgeo.org
Cc: Trevor Wekel
Subject: RE: [mapguide-users] RE: Studio Enterprise and Web Studio
Cannot Connect Randomly


Thanks, I'll give that a try.
 
Apparently these can be set on a per-service level, under
 
HKEY_LOCAL_MACHINE\SOFTWARE\FASTCGI\.fcgi
 
And there is an "Environment" setting.  Maybe this could be used to
overcome the problem with the PROJ_LIB variable not getting picked up?
 
http://viewcvs.php.net/viewvc.cgi/fastcgi-isapi/readme.txt?view=markup
 
Jason

  _____  

From: Trevor Wekel
Subject: RE: [mapguide-users] RE: Studio Enterprise and Web Studio
Cannot Connect Randomly


Hi Jason,
 
Telling isapi_fcgi and mod_fastcgi to spin up two servers might help but
I've had trouble forcing them to spin up agents.  mod_fastcgi is
especially obstinate.  Even under load it doesn't like to spin up more
than one agent.  Here are the appropriate settings:
 
For IIS:
 
Increase the registry setting HKEY_LOCAL_MACHINE\SOFTWARE\FASTCGI
StartServers REG_DWORD 1 
 
 
For Apache, modify httpd.conf and increase -minProcesses:
 
Change
 
FastCgiConfig -idle-timeout 120 -minProcesses 1 -maxClassProcesses 4
-multiThreshold 100 -singleThreshold 100 -killInterval 600
 
to
 
FastCgiConfig -idle-timeout 120 -minProcesses 2 -maxClassProcesses 4
-multiThreshold 100 -singleThreshold 100 -killInterval 600
 

Note:  PHP uses a different configuration line and should already be
spinning up 4 processes:
 
FastCgiServer "C:/Program
Files/MapGuideOpenSource/WebServerExtensions/php/php-cgi.exe" -processes
4 -idle-timeout 120 -
initial-env PHP_FCGI_MAX_REQUESTS=500 -initial-env PHP_FCGI_CHILDREN=1^M
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20061116/1e116197/attachment.html


More information about the Mapguide-users mailing list