This is platform-independent issue that has been reported to both Mushroom Observer and to INat support by multiple users.
Description of problem
Step 1: Goto https://www.inaturalist.org/observations/moimport
Step 2: Fill in MO API Key
Step 3: Click “Test”
RESULT: 504 Gateway Time-out nginx
I hope the following will expedite a fix.
PS: It’s not safe to assume that the MO image has extension jpg
.
MO Webmaster webmaster@mushroomobserver.org
Oct 24, 2021, 8:19:42 PM
to help@inaturalist.org, mo-developers
Dear iNat:
I poked around a bit in the iNat code. I don’t completely understand what’s going on, but I see some issues here:
image_url = "[https://mushroomobserver.nyc3.digitaloceanspaces.com/orig/#{image[:id]}.jpg](https://mushroomobserver.nyc3.digitaloceanspaces.com/orig/#%7Bimage[:id]%7D.jpg)"
https://github.com/inaturalist/inaturalist/blob/88c24041fe0df7f81fe1d04914ecdba29c319f43/app/models/mushroom_observer_import_flow_task.rb#L293
and maybe here:
image_url = "[https://images.mushroomobserver.org/orig/#{image[:id]}.jpg](https://images.mushroomobserver.org/orig/#%7Bimage[:id]%7D.jpg)"
https://github.com/inaturalist/inaturalist/blob/88c24041fe0df7f81fe1d04914ecdba29c319f43/app/models/mushroom_observer_import_flow_task.rb#L303
To get an MO image, external users should use a URL in the form:
https://mushroomobserver.org/images/<*size*>/<*id*>.<*ext*>
Other URLs are not guaranteed to be stable and may break at some point down the line.
Line 293 above will certainly cause an error; we recently moved our image store from Digital Ocean to Google Cloud Platform. Digital Ocean’s response looks like:
<Error>
<Code>AccessDenied</Code>
<BucketName>mushroomobserver</BucketName>
<RequestId>tx00000000000001bc68251-0061761d48-67e7768-nyc3a</RequestId>
<HostId>67e7768-nyc3a-nyc</HostId>
</Error>
I don’t know how the iNat code interprets that.
Line 303 above should not cause a timeout, but may cause a 404.
Please let us know if you think there’s a different problem, or if there’s something we can do to help isolate/debug the issue.
Again, it would help to know the details of the request that’s causing the 504 gateway timeout.
Best regards,
– Joe Cohen
MO Dev Team