Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Getting 500 error from API in specific place #910

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 5 comments
Closed

Getting 500 error from API in specific place #910

openstreetmap-trac opened this issue Jul 23, 2021 · 5 comments

Comments

@openstreetmap-trac
Copy link

Reporter: eleonenko[at]yandex.ru
[Submitted to the original trac issue database at 11.27pm, Friday, 16th May 2008]

Getting 500 Error from API using this url
http://api.openstreetmap.org/api/0.5/map?bbox=27.39887,53.88464,27.41698,53.89293

There are some test roads with restriction relations.

@openstreetmap-trac
Copy link
Author

Author: tom[at]compton.nu
[Added to the original trac issue at 9.21am, Saturday, 17th May 2008]

It appears to be trying to output a bogus relation:

NoMethodError (undefined method visible?' for nil:NilClass): /app/models/relation.rb:83:in to_xml_node'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/active_record/associations/association_proxy.rb:124:in method_missing' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/active_record/associations/association_collection.rb:162:in method_missing'
/app/models/relation.rb:74:in to_xml_node' /app/controllers/api_controller.rb:190:in map'
/app/controllers/api_controller.rb:189:in map' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/base.rb:1168:in perform_action_without_filters'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/filters.rb:697:in call_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/filters.rb:689:in perform_action_without_benchmark'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/benchmarking.rb:68:in perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:in measure'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/benchmarking.rb:68:in perform_action_without_rescue' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/rescue.rb:199:in perform_action_without_caching'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/caching.rb:678:in perform_action' /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in cache'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/active_record/query_cache.rb:8:in cache' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/caching.rb:677:in perform_action'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/base.rb:524:in process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/filters.rb:685:in process_without_session_management_support'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/session_management.rb:123:in process' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/base.rb:388:in process'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/dispatcher.rb:171:in handle_request' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/dispatcher.rb:115:in dispatch'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/dispatcher.rb:126:in dispatch_cgi' /usr/lib/ruby/gems/1.8/gems/actionpack-2.0.1/lib/action_controller/dispatcher.rb:9:in dispatch'
/usr/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/fcgi_handler.rb:101:in process_request' /usr/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/fcgi_handler.rb:149:in with_signal_handler'
/usr/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/fcgi_handler.rb:99:in process_request' /usr/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/fcgi_handler.rb:77:in process_each_request'
/usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:612:in each_cgi' /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in each_cgi'
/usr/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/fcgi_handler.rb:76:in process_each_request' /usr/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/fcgi_handler.rb:50:in process!'
/usr/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/fcgi_handler.rb:24:in `process!'
/public/dispatch.fcgi:24

@openstreetmap-trac
Copy link
Author

Author: ehabkost[at]raisama.net
[Added to the original trac issue at 7.15pm, Tuesday, 27th May 2008]

I just got a http error 500 on a different region of the map:

http://www.openstreetmap.org/api/0.5/map?bbox=-49.208773638563834%2c-25.472306120079054%2c-49.20397239352369%2c-25.46778288140274

I don't know if it is exactly the same bug because I don't see the ruby backtrace. :)

I bet it is the same problem, because the last edition I have made in this area involved relations. It happened just after I have added a node to a way and added the node to a type=route;route=bus relation using Potlatch.

@openstreetmap-trac
Copy link
Author

Author: ehabkost[at]raisama.net
[Added to the original trac issue at 6.34pm, Thursday, 5th June 2008]

Is the root cause of this bug known?

Currently I can't fetch map data for Curitiba on JOSM because of this bug. Exporting it as .osm on the Web interface doesn't work, either. This is blocking me from working on the map for Curitiba using anything except Potlatch.

@openstreetmap-trac
Copy link
Author

Author: ehabkost[at]raisama.net
[Added to the original trac issue at 10.20pm, Tuesday, 10th June 2008]

Just in case, I am documenting here how I fixed the relation data to avoid the problem for the region around Curitiba on the map:

I have checked manually through API queries what was the ID of the relation that was recently changed when the bug appeared. Luckly I have found it (14680).

Then I checked the relation history at:
http://api.openstreetmap.org/api/0.5/relation/14680/history

I have found three bogus nodes on the relation data (with refs 0, 20 and 40). I have updated the relation without the bogus nodes using curl, and now the problem doesn't hit me anymore.

However, probably there are other broken relations on the database for other areas of the map. The server could either make impossible to create the broken relations, or handle the bogus references without crashing.

@openstreetmap-trac
Copy link
Author

Author: tom[at]compton.nu
[Added to the original trac issue at 12.04pm, Sunday, 3rd May 2009]

If this wasn't already fixed then the API 0.6 migration should have fixed it as we cleaned up all the nonsense in the database during the migration I think.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant