NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

We have an error situation in the update process (openstreetmap-tiles-update-expire). At certain times, the update process crashes and does not proceed. The error message in the file /var/log/tiles/osm2pgsql.log is shown below:

Reading in file: /var/lib/mod_tile/changes.osc.gz

Using XML parser.

Processing: Node(10k 0.0k/s) Way(3k 3.66k/s) Relation(40 20.00/s) parse time: 407s

Node stats: total(10020), max(9090048720) in 404s

Way stats: total(3661), max(983093395) in 1s

Relation stats: total(81), max(13209476) in 2s

DB writer thread failed due to ERROR: result COPY_END for planet_osm_polygon failed: ERROR: invalid input > syntax for type integer: "2.75"

CONTEXT: COPY planet_osm_polygon, line 26, column layer: "2.75"

The message above seems to indicate that a double value (2.75) is being written to the layer field of the planet_osm_polygon table, which is set to integer.

To work around this, we decreased the value of the maxInterval parameter in the configuration file /var/lib/mod_tile/.osmosis/configuration.txt And we manually increment the sequenceNumber value of the /var/lib/mod_tile/.osmosis/state.txt file, so that it advances in the update. We believe there may be some information recorded wrong in the update files, which are available at https://planet.openstreetmap.org/replication/minute

However, this is impacting our environment as it requires a lot of technical intervention.

Our environment is Ubuntu 20.04 LTS. The osm2pgsql version is shown below:

osm2pgsql version 1.2.1 (64 bit id space)

Compiled using the following library versions:

Libosmium 2.15.4

Lua 5.2.4

We would appreciate if you can guide us on how to solve the problem.

Yours sincerely,

asked 17 Sep '21, 15:30

FPintoA's gravatar image

FPintoA
11112
accept rate: 0%


Something in your map style can't cope with non-integer layer values. You've not said what style it is, so we can't directly help with that, but maybe this example will help:

this line in a lua style file makes sure that only seinsible layer values are used for z_order and tthe lines below here in a lua style file try and guess at layers from invalid values. See other uses of "tonumber" in that lua style file.

One other point to mention, since your seeing this in openstreetmap-tiles-update-expire - are you definitely calling the lua transforms from that and not the C transforms?

For completeness, the offending data in OSM is here, and it's not "a bug in OSM" as such - anything that consumes OSM data needs to be able to consume whatever is there. Scroll to the end of the list in taginfo and you'll see all sorts of values there.

permanent link

answered 17 Sep '21, 16:11

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

edited 17 Sep '21, 16:12

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×293
×287
×13
×12
×1

question asked: 17 Sep '21, 15:30

question was seen: 967 times

last updated: 17 Sep '21, 16:12

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum