diff options
| author | Tim Graham <timograham@gmail.com> | 2012-08-03 05:17:52 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2012-08-03 05:20:03 -0400 |
| commit | c8e681f6243fd0df1489d966089f12a16fd71c69 (patch) | |
| tree | 0ef66381c95a2324e873eb2a65c65f239bcc0a52 /docs | |
| parent | e9f458133c7e2357e66b3e0b97f7b454ae34a684 (diff) | |
[1.4.X] Fixed #13904 - Documented how to avoid garbage collection messages in GIS.
Thanks Claude Peroz for the patch.
Backport of 083a3a4e39 from master
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/gis/geos.txt | 11 | ||||
| -rw-r--r-- | docs/ref/contrib/gis/install.txt | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/docs/ref/contrib/gis/geos.txt b/docs/ref/contrib/gis/geos.txt index a82ac87acf..24362f3b70 100644 --- a/docs/ref/contrib/gis/geos.txt +++ b/docs/ref/contrib/gis/geos.txt @@ -75,6 +75,17 @@ return a :class:`GEOSGeometry` object from an input string or a file:: >>> pnt = fromfile('/path/to/pnt.wkt') >>> pnt = fromfile(open('/path/to/pnt.wkt')) +.. _geos-exceptions-in-logfile: + +.. admonition:: My logs are filled with GEOS-related errors + + You find many ``TypeError`` or ``AttributeError`` exceptions filling your + Web server's log files. This generally means that you are creating GEOS + objects at the top level of some of your Python modules. Then, due to a race + condition in the garbage collector, your module is garbage collected before + the GEOS object. To prevent this, create :class:`GEOSGeometry` objects + inside the local scope of your functions/methods. + Geometries are Pythonic ----------------------- :class:`GEOSGeometry` objects are 'Pythonic', in other words components may diff --git a/docs/ref/contrib/gis/install.txt b/docs/ref/contrib/gis/install.txt index 9cb945f76a..f6cd1346cb 100644 --- a/docs/ref/contrib/gis/install.txt +++ b/docs/ref/contrib/gis/install.txt @@ -191,6 +191,8 @@ GEOS C library. For example: The setting must be the *full* path to the **C** shared library; in other words you want to use ``libgeos_c.so``, not ``libgeos.so``. +See also :ref:`My logs are filled with GEOS-related errors <geos-exceptions-in-logfile>`. + .. _proj4: PROJ.4 |
