[mapguide-internals] Take 2: Patch for ticket 2596 (Constant crashes under high load/many concurrent requests)

Jackie Ng jumpinjackie at gmail.com
Sun Jul 10 16:48:53 PDT 2016


Hi All,

Attached is a revised patch (2596_v4.patch) to address server stability
issues reported on ticket 2596.

The main culprit is an improperly scoped
Ptr<MgResourceLayerDefinitionCacheItem>, which combined with a refcount
restriction in the cache itself (similar to the restriction for cached
spatial context readers), could cause MdfModel::VectorLayerDefinition
pointers to be prematurely deleted under high load.

The patch also ensures the scale setting code is only applied to
VectorLayerDefinition pointers that didn't come from the 2nd level cache.

This patch also removes the use of CLocalizer in the geos library, which as
reported by Andreas Morf, has been shown to cause additional instability due
to its use of std::setlocale (which isn't thread safe). Since the mgserver
already forces a "C" locale for numbers (LC_NUMERIC) on startup, the use of
CLocalizer in geos would be redundant.

Please review. Thanks.

- Jackie



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Take-2-Patch-for-ticket-2596-Constant-crashes-under-high-load-many-concurrent-requests-tp5275650.html
Sent from the MapGuide Internals mailing list archive at Nabble.com.


More information about the mapguide-internals mailing list