Friday, August 20, 2010

php-cgi.exe exceeds the current memory limitation

Problems:
Memory on php-cgi runs out when executing php-scripts.
Formula for Instances:

Ideal Instances: (TotalMemory in GB/Instances) < 2

Recommended Instances: (TotalMemory in GB / Instances) < 1

If you are using IIS or apache check for the following parameters which affects the performance of php,

These are settings in
php.ini Settings:
session.gc_probability = 1
session.gc_divisor     = 100
session.gc_maxlifetime = 14400 - After 4 hours it resets all the Garbage collected Data.


Web Server Settings:

NumberofRequest Per Instance
MaxRequests for the CGI
Maximum Number of Instances

It works charm with distributed memory on the distributed instances.

No comments: