[Imports] osmosis OutOfMemory: Java heap space

Zugravu Radu-Stefan radu.zugravu at yahoo.com
Mon Apr 22 07:45:39 UTC 2013


Hi,

I am trying to import a large area from europe.osm. To do that I executed the following command:

"C:\Program Files (x86)\osmosis\bin\osmosis.bat" --read-xml file="G:\Restricted\Radu\Facultate\2012-2013\Licenta\europe.osm" --bounding-box left=12.04 top=55.44 right=30.19 bottom=43.51 --write-pgsql host="localhost" database="eastern_europe" user="postgres" password="parola"
After almost a day of executing the following error dropped:
OutOfMemmory: Java heap space
From what I've seen on http://wiki.openstreetmap.org/wiki/Osmosis/Tuning a quick fix for this error is to set JAVACMD_OPTIONS to change the amount of memmory allocated (JAVACMD_OPTIONS=-Xmx2G will allocate 2 GB).

First of all I would like to know where do I have to set JAVACMD_OPTIONS. I am a Windows user. Do I have to edit osmosis.bat in bin directory?

Also setting JAVACMD_OPTIONS to 2GB will be enough for osmosis to not crush again or do I have to set other variables? I want to be sure before executing the process again because I have to wait almost a day to see any results and I will loose a lot of time if it crashes again.

Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/imports/attachments/20130422/429fc990/attachment.html>


More information about the Imports mailing list