I haven't used PgRouting much so I'm a little in the dark here. However, I am attempting a driving distance calculation like the one described by Underdark here.

My SQL is identical, I have a routable network etc etc. I have also successfully run this in the past on another database. However, when I run the simple piece of sql below, it completely crashes the Postgresql server with no error other than connection to server has been lost:

SELECT * FROM driving_distance('
      SELECT gid AS id,
          start_id::int4 AS source,
          end_id::int4 AS target,
          shape_leng::float8 AS cost
      FROM network',

I first spotted the crash when trying to run this from Python. I restarted the computer and tried to run the stripped down version above from PGAdmin. It still crashes. BTW the '494902005' value is my node id and I want to limit the search to 50km. Because I am not getting any feed back, I don't know where to start diagnosing the issue. I am using PostGIS 2/PostGreSQL 9.1 on 32bit Windows 7.

Any ideas gratefully received!

  • Which pgRouting windows binary do yo use? – sanak Sep 12 '12 at 1:11
  • It is one you compiled ("pgRouting-git-sanak-mingw_20120310_pg-9.1(x86)"). I believe this is the recommended one. Do you think re-installing it would help or maybe try one of the experimental ones? Also, many thanks for maintianing these Windows Binaries. It is much appreciated as is your help! – MappaGnosis Sep 12 '12 at 6:32
  • I have just tried version "pgRouting-git-sanak-mingw32_20120703_pg-9.1(x86_32)" and I get the same result. – MappaGnosis Sep 12 '12 at 6:57
  • Ok, thanks for reply. And I confirmed that this issue is reproducible after one source/target value changed to '494902005' with my "pgRouting-git-sanak-mingw32_20120703_pg-9.1(x86_32)". This may be unknown driving distance issue. So, I will investigate this issue, but if you hurry, try reduce source/target id values by Minimum value of (source/target). – sanak Sep 12 '12 at 14:09

The cause of this issue is too high source/target id.

Out of memoery error occurred when vertices list is resized to '494902005' in "boost/graph/detail/adjacency_list.hpp" - "add_edge" method.
(See the following debug image's comment.)

enter image description here

So, it will be necessary to reduce max source/target value to proper one.

  • Thanks Sanak. My Source and Target ids are just the original ones from the raw OSM data my network is derived from - hence the very high numbers. However, I can easily renumber for now. You've been a great help! – MappaGnosis Sep 15 '12 at 7:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.