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: Sun, 17 Apr 2016 10:07:21 +0200

Hi Pierre,

runtime error: Query failed with the exception: std::bad_alloc
Is this a bug? Or are they any options I should add to request memory or
other ressources?

Thank you for reporting the issue. It is essentially a bug from a recent change. I've fixed it now. Please try it again.

This is a consequence of a new sanity check. For the curious:

The rationale behind that sanity check is that once every 100 million requests or so we had a query that used so much memory that it damaged the server operations, i.e. it tried to use 30 GB of RAM. In such a situation the operating system kills a process to free memory and it doesn't always choose the right one. And before that such a request already had steamrolled all the disk cache.

While each of these events is a software bug on its own, I would prefer to catch those runaways before they disturb the server operation. So we need at least some loose hard limits to detect when a query is definitely runaway.

Hence, all queries are now by the operating system limited on allowed processor time and memory. It turns out that the limits I expected to be loose aren't loose enough. For that reason I've now adjusted the limit from
2 x requested memory + 128 MB
2 x requested memory + 1 GB

The time limit has been raised for a similar reason from
2 x requested time + 15 seconds
2 x requested time + 60 seconds

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

Best regards,


Archive powered by MHonArc 2.6.18.

Top of Page