openstreetmap / openstreetmap-website

The Rails application that powers OpenStreetMap
https://www.openstreetmap.org/
GNU General Public License v2.0
2.21k stars 918 forks source link

Slow objects fetching on backend (Ruby on Rails) #5342

Closed blaqueee closed 2 days ago

blaqueee commented 3 days ago

I deployed OSM to my server. 16 CPU/16 GB RAM. Also configured iD editor to edit my own database data. But when I want to fetch objects, it is loading very slow. Front is working good, I see that OSM gives response slowly.

Are there any settings/features that I need to configure/enable to make it load fast? Because in production I see it loads immediately. Thank you!

nenad-vujicic commented 2 days ago

Can you provide more information about your hardware and server configuration? For example, do you use virtualization, and if so, what type?

blaqueee commented 2 days ago

Can you provide more information about your hardware and server configuration? For example, do you use virtualization, and if so, what type?

nope, I dont use virtualization

tomhughes commented 2 days ago

Really this is a bug tracker, not a support forum, but bear in mind that our production setups don't even use the rails API implementation for the main map data calls precisely because there is no way to get reasonable performance.

If you have significant amounts of data you probably want to be using cgimap for the API calls it supports.

blaqueee commented 2 days ago

Really this is a bug tracker, not a support forum, but bear in mind that our production setups don't even use the rails API implementation for the main map data calls precisely because there is no way to get reasonable performance.

If you have significant amounts of data you probably want to be using cgimap for the API calls it supports.

really? production APIs are written on c++?

Firefishy commented 2 days ago

Really this is a bug tracker, not a support forum, but bear in mind that our production setups don't even use the rails API implementation for the main map data calls precisely because there is no way to get reasonable performance. If you have significant amounts of data you probably want to be using cgimap for the API calls it supports.

really? production APIs are written on c++?

For reference you can find the API calls we send to cgimap here: https://github.com/openstreetmap/chef/blob/08be09e5a29886586d4955e6bdcc6592ed6e531e/cookbooks/web/templates/default/apache.frontend.erb#L179-L190

blaqueee commented 2 days ago

Really this is a bug tracker, not a support forum, but bear in mind that our production setups don't even use the rails API implementation for the main map data calls precisely because there is no way to get reasonable performance. If you have significant amounts of data you probably want to be using cgimap for the API calls it supports.

really? production APIs are written on c++?

For reference you can find the API calls we send to cgimap here: https://github.com/openstreetmap/chef/blob/08be09e5a29886586d4955e6bdcc6592ed6e531e/cookbooks/web/templates/default/apache.frontend.erb#L179-L190

Thank you!

AntonKhorev commented 1 day ago

We have this in readme

A fully-functional openstreetmap-website installation depends on other services, including map tile servers and geocoding services, that are provided by other software.

Maybe we should mention cgimap too.