Piwigo / piwigo-openstreetmap

OpenStreetMap integration for Piwigo
http://piwigo.org/ext/extension_view.php?eid=701
GNU General Public License v3.0
35 stars 35 forks source link

Gateway Timeout when tagging #110

Closed JD4x4 closed 7 years ago

JD4x4 commented 7 years ago

I'm a new user, so forgive me if I'm overlooking something.. I have several thousand photos with exif geodata, and ran OpenStreetMap City and State tagging on them shortly after uploading, but roughly 2/3rds of them have not returned a tag although all but a handful have maps (so I know they've gone through the plugin and been identified for coordinates).

Now when I run tagging on them, after about 3 to 5 minutes I get "Gateway Timeout- The gateway did not receive a timely response from the upstream server or application."

Is there something I can change in php to allow more processing time? Is this a problem with OpenStreetMap plugin? Do I need to somehow process my images in smaller batches? Any help is greatly appreciated. Using the latest Pwigo and OpenStreetMap versions, running on a 1and1 web site host with PHP 5.6

xbgmsharp commented 7 years ago

OpenStreetMap Nominatim (http://wiki.openstreetmap.org/wiki/Nominatim_usage_policy) is limited to 1 request a second. By default you are using my proxy, https://nominatim-xbgmsharp.rhcloud.com to cache response. Try to do the tagging by smaller batch. If you wish you could use the alternative mapquestapi.com which require a API key.

JD4x4 commented 7 years ago

Thank you for the quick reply. I suspected that since I've done a similar reverse geocode for a poi file spreadsheet using google maps. I'm not very well versed in php, but should it be possible for me to add a delay loop somewhere? If so, which php file? (pardon my inexperience).

Otherwise, I'll try to split my photos into smaller albums, and once geotagged merge them back.

edit: I think I get what you are saying now.. the delay is between your proxy and my server, not between my server and OSM. In that case, smaller batches are the only solution, I suppose.

I've tried various batch sizes and have success up to about 370 photos at a time. I suppose I can work with that, but I think I'll try to change the defaults on the plugin tagging form and PWG batch display list size so I don't realize after 1000 geotags of 5000 photos that most of them were set to "simulation" mode! :-0

... Thanks for your help.