Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#4494 closed defect (fixed)

Relation members won't download

Reported by: NE2 Owned by: rails-dev@…
Priority: major Milestone:
Component: api Version:
Keywords: Cc:


If I try to download members of relation 1593692 in JOSM I get an internal server error. It's not the size (significantly larger relations download just fine).

I'm not sure if this is a JOSM or API bug, but the error message seems to indicate the latter.

Change History (7)

comment:1 Changed 7 years ago by Tom Hughes

You need to specify exactly what URL you are hitting, as it will make a big difference to the amount of work the server has to do, not to mention that I can't investigate without knowing that.

That said, it almost certainly is the size - because you are fetching the members it is not just the number of members that matters but the total size and complexity of all the members. The precise details will depend on the URL though, as that controls how far the API is trying to recurse into the members.

comment:2 Changed 7 years ago by NE2

If it helps, relation 416635 does it too. I remember this one also failed before my recent edit to it.

I'm right clicking on the relation in JOSM and selecting 'download members'. It appears the URL being downloaded is .

It's definitely not the size, judging by other relations I can download.

comment:3 Changed 7 years ago by Tom Hughes

The /full is critical because it means it will try and recurse into all the members, so the size of those will matter as well as the size of the top level relation.

comment:4 Changed 7 years ago by Tom Hughes

There are a total of 582 ways and 24746 nodes referenced from that second relation.

comment:5 Changed 7 years ago by Tom Hughes

Ah, so it's not actually a timeout, it's the complexity of the SQL query that rails is constructing, which causes Postgres to run out of stack space.

I'll think about increasing the stack limit a bit, but that may need a database server restart. The real solution is to get the relation/full call moved into cgimap where we can control the SQL better.

comment:6 Changed 7 years ago by Tom Hughes

Resolution: fixed
Status: newclosed

I've increased the stack depth limit as much as I can without restarting the server and both of those relations now work - there will doubtless be others which won't though.

comment:7 Changed 7 years ago by NE2

Thanks - I'm still not convinced it's solely size of relation plus elements, but if it works now...

Note: See TracTickets for help on using tickets.