[openstreetmap/openstreetmap-website] Slow response in rendering phase while calling /map endpoint (Issue #6057)
mahmoudhanafy created an issue (openstreetmap/openstreetmap-website#6057) Hi Team, Thanks for the great work you are doing. I'm completely new to ruby and to this project. I'm currently running a local version of osm-website, and I'm calling this endpoint: ``` https://myLocalWebsite/api/0.6/map?bbox=46.699791,24.6334425,46.7233944,24.6471732 ``` but it's taking too long in the rendering phase, I see the following line in logs: ``` Completed 200 OK in 25244ms (Views: 19820.2ms | ActiveRecord: 4122.8ms (26457 queries, 24031 cached) | GC: 1631.1ms) ``` I see a lot of queries like this: ``` SELECT "changesets".* FROM "changesets" WHERE "changesets"."id" = $1 LIMIT $2 ``` So I have updated maps_controller to include changeset with nodes [here](https://github.com/openstreetmap/openstreetmap-website/blob/master/app/controllers/api/maps_controller.rb#L31), instead of loading it while rendering. it improved the performance but it's still taking around 11-12 seconds. When I'm trying the same request on the public website, it's taking less than 1 second (even without my change) ``` https://api.openstreetmap.org/api/0.6/map?bbox=46.699791,24.6334425,46.7233944,24.6471732 ``` So I'm wondering if there is any type of caching or multi-threading happening on the public website but not happening on my version. Thanks in advance, -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/6057 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev mailing list rails-dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/rails-dev
[openstreetmap/openstreetmap-website] Include changeset with node instead of loading it while rendering (PR #6058)
Related to this issue: https://github.com/openstreetmap/openstreetmap-website/issues/6057 The exact details in the issue above. You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/6058 -- Commit Summary -- * Include changeset with node instead of loading it while rendering -- File Changes -- M app/controllers/api/maps_controller.rb (4) -- Patch Links -- https://github.com/openstreetmap/openstreetmap-website/pull/6058.patch https://github.com/openstreetmap/openstreetmap-website/pull/6058.diff -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6058 You are receiving this because you are subscribed to this thread. Message ID:___ rails-dev mailing list rails-dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/rails-dev
Re: [openstreetmap/openstreetmap-website] Include changeset with node instead of loading it while rendering (PR #6058)
mahmoudhanafy left a comment (openstreetmap/openstreetmap-website#6058) Hi @tomhughes Thanks for the feedback, I have updated the PR. Please have a look. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6058#issuecomment-2915454589 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev mailing list rails-dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/rails-dev
Re: [openstreetmap/openstreetmap-website] Include changeset with node instead of loading it while rendering (PR #6058)
abohanafy left a comment (openstreetmap/openstreetmap-website#6058) Hi @tomhughes Thanks for the feedback, I have updated the PR. Please have a look. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6058#issuecomment-2915386261 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev mailing list rails-dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/rails-dev
Re: [openstreetmap/openstreetmap-website] Include changeset with node instead of loading it while rendering (PR #6058)
@mahmoudhanafy pushed 1 commit. 41e0f758ac9f50b60d84f47c4aa64196841c2688 Preload changeset, relation_members, relation_tags -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6058/files/8675f6b352fe0d15e27fe2302eeb3611723bc83a..41e0f758ac9f50b60d84f47c4aa64196841c2688 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev mailing list rails-dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/rails-dev
Re: [openstreetmap/openstreetmap-website] Include changeset with node instead of loading it while rendering (PR #6058)
@mahmoudhanafy pushed 1 commit. 14027d982279f98da40fda6435abf6ebef9e4f9a Preload changeset, relation_members, relation_tags -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6058/files/41e0f758ac9f50b60d84f47c4aa64196841c2688..14027d982279f98da40fda6435abf6ebef9e4f9a You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev mailing list rails-dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/rails-dev
Re: [openstreetmap/openstreetmap-website] Include changeset with node instead of loading it while rendering (PR #6058)
mahmoudhanafy left a comment (openstreetmap/openstreetmap-website#6058) In my case it was taking around 21-21 seconds after this change it's now taking around 7 seconds. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/6058#issuecomment-2916691174 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev mailing list rails-dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/rails-dev
Re: [openstreetmap/openstreetmap-website] JOSM can't use OAuth2 to connect to my local osm-website (Issue #6073)
mahmoudhanafy left a comment (openstreetmap/openstreetmap-website#6073) Thanks for your response. I have another question, not related to this issue. but appreciate if you can reply. Are there versions for openstreetmaps-website? I mean like stable versions that can be used instead of using the the latest master. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/6073#issuecomment-2930169415 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev mailing list rails-dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/rails-dev
Re: [openstreetmap/openstreetmap-website] Slow response in rendering phase while calling /map endpoint (Issue #6057)
mahmoudhanafy left a comment (openstreetmap/openstreetmap-website#6057) Thanks for your response @HolgerJeromin I didn't know about cgimap before, I'm using it now and it's working much faster. I'm going to close this issue, as it should be fixed by the PR I merged. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/6057#issuecomment-2927250351 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev mailing list rails-dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/rails-dev
Re: [openstreetmap/openstreetmap-website] Slow response in rendering phase while calling /map endpoint (Issue #6057)
Closed #6057 as completed. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/6057#event-17914289685 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev mailing list rails-dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/rails-dev
[openstreetmap/openstreetmap-website] JOSM can't use OAuth2 to connect to my local osm-website (Issue #6073)
mahmoudhanafy created an issue (openstreetmap/openstreetmap-website#6073) Hi Team, I'm trying to connect from JOSM to osm using OAuth2 but I see this the following in the logs: ``` 2025-06-01 14:35:14.134 SEVERE: Authentication failed - Authentication at the OSM server with the username 'my_user' failed.Please check the username and the password in the JOSM preferences. 2025-06-01 14:37:05.429 INFO: GET https://osm.test/.well-known/oauth-authorization-server -> HTTP/1.1 404 (464 ms; 4.86 kB) 2025-06-01 14:37:05.735 INFO: GET https://osm.test/.well-known/oauth-authorization-server -> HTTP/1.1 404 (148 ms; 4.86 kB) 2025-06-01 14:37:06.027 INFO: GET https://osm.test/.well-known/oauth-authorization-server -> HTTP/1.1 404 (149 ms; 4.86 kB) ``` I'm pretty sure the username and password I'm using are correct (I use them to login on the website0. I was first using older version of the code and it was working fine with basic authentication. but after upgrading to the latest version of the code I got the following errors, and I can't authenticate with basic authentication or OAuth2 -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/6073 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev mailing list rails-dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/rails-dev
Re: [openstreetmap/openstreetmap-website] JOSM can't use OAuth2 to connect to my local osm-website (Issue #6073)
mahmoudhanafy left a comment (openstreetmap/openstreetmap-website#6073) Hi Tom, Thanks for your response. The problem I currently have is that the authorisation button is disabled. and I see the following message in JOSM logs ``` 2025-06-01 14:37:05.429 INFO: GET https://osm.test/.well-known/oauth-authorization-server -> HTTP/1.1 404 (464 ms; 4.86 kB) ``` and I see these message on osm-website logs: ``` [09203e1b354075ed30b649b51ae6100a] ActionController::RoutingError (No route matches [GET] "/.well-known/oauth-authorization-server"): [09203e1b354075ed30b649b51ae6100a] [09203e1b354075ed30b649b51ae6100a] Processing by ErrorsController#not_found as */* [09203e1b354075ed30b649b51ae6100a] Rendering layout layouts/error.html.erb [09203e1b354075ed30b649b51ae6100a] Rendering errors/not_found.html.erb within layouts/error [09203e1b354075ed30b649b51ae6100a] Rendered errors/_contact.html.erb (Duration: 0.2ms | GC: 0.0ms) [09203e1b354075ed30b649b51ae6100a] Rendered errors/not_found.html.erb within layouts/error (Duration: 0.5ms | GC: 0.0ms) [09203e1b354075ed30b649b51ae6100a] Rendered layouts/_meta.html.erb (Duration: 1.2ms | GC: 0.0ms) [09203e1b354075ed30b649b51ae6100a] Rendered layout layouts/error.html.erb (Duration: 2.2ms | GC: 0.0ms) [09203e1b354075ed30b649b51ae6100a] Completed 404 Not Found in 3ms (Views: 2.6ms | ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.0ms) ``` I think something is misconfigured at the website, not sure exactly. https://github.com/user-attachments/assets/3d3bb217-da2b-4cc5-b451-b2f0f55904bb"; /> https://github.com/user-attachments/assets/f2f5fd17-5adf-40ad-ba01-c300ad741517"; /> -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/6073#issuecomment-2927505357 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev mailing list rails-dev@openstreetmap.org https://lists.openstreetmap.org/listinfo/rails-dev