How can I increase the limit of 50,000 nodes on my server?

I started my OSM server from this project:

The server responds correctly to requests.I wanted to increase this limit:
You requested too many nodes (limit is 50000). Either request a smaller area, or use planet.os

I found its setting in the settings.yml file, but after zooming in, the server started returning a 404 error (page not found).I’ve tried increasing other settings, but nothing helps so far. The server responds normally to other requests with a smaller amount of data.Where else can I set this up?

1 Like

sorry for generic nonexpert advise:

have you tried looking into server logs? they may have more info than user-facing error page

is 404 appearing also without this configuration change?

Can I confirm, have you edited the max_number_of_nodes: setting in the configuration? And if so what have you changed it to? Have you also changed the max_request_area: setting as well?
If possible would you be able to put your config here?

To clarify when zooming in you get 404 errors? Would you be able to show us specifically what requests to your server get you these 404s?

No, without this configuration change, there is no 404 error. There is a message about the 50,000 nodes limit.

I looked at the logs. The error was this:

↳ app/controllers/api/maps_controller.rb:57:in show' e[1me[36mCACHE Changeset Load (0.0ms)e[0m e[1me[34mSELECT "changesets".* FROM "changesets" WHERE "changesets"."id" = 0e[0m ↳ app/controllers/api/maps_controller.rb:57:in show’
Completed 404 Not Found in 7999ms (ActiveRecord: 923.0ms (11 queries, 2 cached) | GC: 938.2ms)

I think I understand what happened. It looks like I didn’t import the map data into the database correctly. There were errors during the osmosis process.

Yes, I edited these settings and increased both of them. And many others too.

I think I understand what happened. It looks like I didn’t import the map data into the database correctly. There were errors during the osmosis process.

1 Like