Overpass-API icon indicating copy to clipboard operation
Overpass-API copied to clipboard

Adding a [date] to a small query causes it to exhaust memory

Open gboeing opened this issue 6 months ago • 8 comments

If I run a simple query in a small ~400x400 meter bounding box, it completes successfully as expected in <2 seconds (link):

[out:json][timeout:180];((node['highway'='residential'](poly:'37.822573 -122.233912 37.822573 -122.229358 37.826170 -122.229358 37.826170 -122.233912 37.822573 -122.233912');(._;>;););(way['highway'='residential'](poly:'37.822573 -122.233912 37.822573 -122.229358 37.826170 -122.229358 37.826170 -122.233912 37.822573 -122.233912');(._;>;););(relation['highway'='residential'](poly:'37.822573 -122.233912 37.822573 -122.229358 37.826170 -122.229358 37.826170 -122.233912 37.822573 -122.233912');(._;>;);););out;

But if I add a [date] (dating back to just a few hours ago) to the otherwise-same query, it runs out of memory after running for ~25 seconds (link):

[out:json][timeout:180][date:'2025-06-22T00:00:00Z'];((node['highway'='residential'](poly:'37.822573 -122.233912 37.822573 -122.229358 37.826170 -122.229358 37.826170 -122.233912 37.822573 -122.233912');(._;>;););(way['highway'='residential'](poly:'37.822573 -122.233912 37.822573 -122.229358 37.826170 -122.229358 37.826170 -122.233912 37.822573 -122.233912');(._;>;););(relation['highway'='residential'](poly:'37.822573 -122.233912 37.822573 -122.229358 37.826170 -122.229358 37.826170 -122.233912 37.822573 -122.233912');(._;>;);););out;

"An error occurred during the execution of the overpass query! This is what overpass API returned: runtime error: Query run out of memory using about 2048 MB of RAM."

If I do the same thing, with the same date filter, but querying for bus stops instead of residential roads, everything works fine (link):

[out:json][timeout:180][date:"2025-06-22T00:00:00Z"];((node['highway'='bus_stop'](poly:'37.822573 -122.233912 37.822573 -122.229358 37.826170 -122.229358 37.826170 -122.233912 37.822573 -122.233912');(._;>;););(way['highway'='bus_stop'](poly:'37.822573 -122.233912 37.822573 -122.229358 37.826170 -122.229358 37.826170 -122.233912 37.822573 -122.233912');(._;>;););(relation['highway'='bus_stop'](poly:'37.822573 -122.233912 37.822573 -122.229358 37.826170 -122.229358 37.826170 -122.233912 37.822573 -122.233912');(._;>;);););out;

Is this a bug? Why would adding a [date] to that first query exhaust memory, when adding the same [date] to other similar queries works fine?

gboeing avatar Jun 22 '25 04:06 gboeing