[postgis-users] Server not responding

Andreas Forø Tollefsen andreasft at gmail.com
Thu Oct 6 04:17:41 PDT 2011


Seems like everything works if i create everything in PgAdmin SQL query
window and execute the query.
Why is it that while using psycopg2 and python it stops somewhere in the
loop? Any ideas? This might be something for the psycopg2 mailing list.

A.

2011/10/6 Andreas Forø Tollefsen <andreasft at gmail.com>

> Hi Andy,
>
> There is no errors in the log. Also, the cpu load is 100 %. Looking at the
> pg_stat_activity show that the query is still running.
> The locks are also there.
> Maybe I should reinstall everything. As i said, this query has worked
> before, and still do. It just stops in the loop at random steps in the
> loop.
> Another thing. After I terminate the frozen query, I cannot run the script
> again. It just stops in the first one or two years. Restarting the server
> solves this. Some memory problems maybe?
>
> 2011/10/5 Andy Colson <andy at squeakycode.net>
>
>> On 10/5/2011 8:52 AM, Andreas Forř Tollefsen wrote:
>>
>>> Hi all,
>>>
>>> I have a query that previously have been running without problems.
>>> However, after installing everything from scratch it no longer work.
>>> Ubuntu 11.04, Postgresql 8.4.8, PostGIS 2.0 (7932), Geos 3.3.1, GDAL
>>> 1.8.1.
>>>
>>> The script measures distances from centroids of a vector grid to the
>>> nearest international border to a neighboring country.
>>>
>>> It uses psycopg2 module in python to loop through the years. So it
>>> inserts the distances for each year into the borddist table.
>>>
>>> However, the problem after the reinstall is that it usually loops
>>> through some years, and then everything stops. The usual processing time
>>> is ~20 minutes per year.
>>> Could this be a memory issue in postgresql.conf? Or is there a problem i
>>> am not aware of? This used to work on the previous installation, but we
>>> wanted to update the server to latest.
>>>
>>>
>> Can you check the PG logs and see if there are errors?  When you say
>> everything stops, is there a postgres process still running?  Is it blocked?
>>
>> Have you tried:
>>
>> select * from pg_locks;
>> and
>> select * from pg_stat_activity;
>>
>> Is PG using CPU time?  or does it really crash?
>>
>> -Andy
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20111006/89b6c150/attachment.html>


More information about the postgis-users mailing list