Skip to content

Upload of photos is failing due to OpenStreetMap's rate limiting (HTTP 429) #4200

@ildyria

Description

@ildyria

Discussed in #4199

Originally posted by adi2k5 March 18, 2026

Lychee version

7.5.0

Did you check the latest Lychee version?

Yes, I did

Which PHP version are you using?

PHP 8.4

Detailed description of the problem

Uploading more photos at once (at least 25-30 photos) with size of around 1MB each that are being processed quite fast by server, while GPS data showing on map is enabled in Lychee.org, and map provider set to OSM, start to return upload errors after successful upload of first 20-25 photos.
Problem is caused by OpenStreetMap's implementation of rate limiting, that is returning HTTP code 429 when it's API is being aggresively used (https://wiki.openstreetmap.org/wiki/Error_429).

As a workaround, one can upload photos in smaller batches to avoid rate limiting, but that is not too convenient when uploading bigger amounts of photos, thus some rate limiting on Lychee.org side (or implementing some lazy GPS data loading with slower OSM's server querying) could help avoiding that issue.

Using wikimedia as a map provider may not be an option either due to it's external usage policy: https://wikitech.wikimedia.org/wiki/Maps/External_usage

Steps to reproduce the issue

  1. Enable GPS/map with OpenStreetMap
  2. Upload 25+ not too big images with GPS data embedded

Diagnostics [REQUIRED]

Upload to Lychee.org gives following error

[2026-03-18 20:41:00] production.ERROR: 31:/var/www/galeria/app/Jobs/HasFailedTrait.php Client error: `GET https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=56.958138333333&lon=24.110903333333&addressdetails=1&zoom=18&accept-language=pl` resulted in a `429 Too many requests` response:
; caused by
Http\Adapter\Guzzle7\Promise::handleException:110 Client error: `GET https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=56.951653333333&lon=24.11368&addressdetails=1&zoom=18&accept-language=pl` resulted in a `429 Too many requests` response:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/ (truncated...)

Browser & System [REQUIRED]

No response

Please confirm (incomplete submissions will not be addressed)

  • I have provided easy and step-by-step instructions to reproduce the bug.
  • I understand my bug report will be removed if I haven't met the criteria above.
  • I understand that if I am requested to provide more information, I must do so within 14 days or the bug report will be closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions