PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Networking » Net_GeoIP » Bug #10071

Apache handles stacking while using SHMOP

Details

Submitted2007-02-12 07:15 UTC
Fromdanstevens at yahoo dot com
Assignedhlellelid
StatusClosed
PackageNet_GeoIP
PHP Version5.2.0
OSWindows 2003
Roadmaps(Not assigned)

Comments

[2007-02-12 07:15 UTC] danstevens at yahoo dot com

Description:
------------
When running in shared memory mode under apache/windows 2003, handles for the httpd.exe process stack one atop another infinitely until eventually the apache server crashes. Explicitly calling the $geoip->close(); function does not remedy this bug. Presently, the only work around I know of is to disable shared memory mode. Any help would be greatly appreciated.

Test script:
---------------
//This will stack handles:
require "Net/GeoIP.php";
$geoip = Net_GeoIP::getInstance("GeoIP.dat", Net_GeoIP::SHARED_MEMORY);
try {
$this->messageCountry = $geoip->lookupCountryCode($this->messageIP);
} catch (Exception $e) {
ErrorHandler::logEvent( "Unable to Initialize Geo Location DAT File" );
}
$geoip->close();

//only workaround I have found is to change getInstance to:
$geoip = Net_GeoIP::getInstance("GeoIP.dat"/*, Net_GeoIP::SHARED_MEMORY*/);

[2008-03-11 04:14 UTC] danstevens at yahoo dot com

Hi,

I was never able to find a solution and simply left the SHMOP disabled. The performance with SHMOP disabled isn't noticeably worse since windows caches frequently read files in memory. Would be nice to know what's causing this, but you may be right in that it might be a SHMOP problem and not a GeoIP problem.

Cheers,
Dan