Skip to Content.
Sympa Menu

overpass - Re: [overpass] std::bad_alloc runtime error

Subject: Overpass API developpement

List archive

Re: [overpass] std::bad_alloc runtime error

Chronological Thread 
  • From: Roland Olbricht <>
  • To:
  • Subject: Re: [overpass] std::bad_alloc runtime error
  • Date: Wed, 20 Apr 2016 19:09:47 +0200

Hi mmd,

Please report if requests still fail. I'm open to raise the limits even
further if there is good reason to do so.

someone reported an out of memory situation on stack overflow for the
following rather innocent looking query:

way[building](poly:"50.7 7.1 50.7 7.12 50.71 7.11"); (._;>;);out;

/usr/bin/time -v osm3s_query reports the following max memory consumption:

Maximum resident set size (kbytes): 3042896

Maybe the current limit is still a bit low for those kind of queries?

I don't think so. The syscall tells us that the query is using 3 GB of RAM. That's a clear inidication that this query triggers a bug.

Investigating this just yielded the fix e9ddc5fe7bdfb3f3382449489e22c9337e3377f1.

A desired side effect is that this query now completes much faster.

In fact, this is not the whole story, but it helps anyway. The query statement should be smart enough to recognize that there are much to many elements tagged "building" to load them. But to fix this is a different story and would need more testing.

I hope that we will find more fixable resource holes this way.

Best regards,


Archive powered by MHonArc 2.6.18.

Top of Page