AtlasOfLivingAustralia / fieldguide

Fieldguide generator
https://fieldguide.ala.org.au
0 stars 0 forks source link

Field Guide producing empty PDF #13

Closed peggynewman closed 1 year ago

peggynewman commented 5 years ago

Describe the bug Notifed via the support queue https://support.ehelp.edu.au/a/tickets/32303 The Field Guide WS returns a PDF document but it doesn't contain any info.

To Reproduce Steps to reproduce the behavior:

Run query

https://biocache.ala.org.au/occurrences/search?q=*%3A*&wkt=MULTIPOLYGON(((135.70449829101562%20-35.01185211042122%2C136.45706176757812%20-34.043404817602465%2C137.23159790039062%20-33.719618511595506%2C137.48428344726562%20-33.12359751760072%2C137.6600646972656%20-32.98547442175531%2C138.0335998535156%20-33.12359751760072%2C137.76992797851562%20-33.210963313018084%2C137.92922973632812%20-33.550398581136236%2C137.54470825195312%20-33.8246415415585%2C137.38540649414062%20-34.17530164737075%2C137.40188598632812%20-34.890286662377726%2C136.9734191894531%20-34.890286662377726%2C136.80313110351562%20-35.27238230299627%2C135.70449829101562%20-35.01185211042122)))

https://biocache.ala.org.au/occurrences/search?file=records-2019-05-09&reasonTypeId=12&dwcHeaders=true&fileType=csv&qa=none&sourceTypeId=0&q=*%3A*&wkt=MULTIPOLYGON(((135.70449829101562%20-35.01185211042122%2C136.45706176757812%20-34.043404817602465%2C137.23159790039062%20-33.719618511595506%2C137.48428344726562%20-33.12359751760072%2C137.6600646972656%20-32.98547442175531%2C138.0335998535156%20-33.12359751760072%2C137.76992797851562%20-33.210963313018084%2C137.92922973632812%20-33.550398581136236%2C137.54470825195312%20-33.8246415415585%2C137.38540649414062%20-34.17530164737075%2C137.40188598632812%20-34.890286662377726%2C136.9734191894531%20-34.890286662377726%2C136.80313110351562%20-35.27238230299627%2C135.70449829101562%20-35.01185211042122)))&&pageSize=0&&facet=true

Click 'Download' Select Species Field Guide

Expected behavior ALA User receives an email containing a link to a PDF download containing a list of species in the area

Actual behavior ALA user receives an email containing a link to a (for me, 1.1MB) PDF download containing headers and footers only.

09052019-fieldguide1557382357490.pdf

nickdos commented 5 years ago

I got a working PDF for this query:

https://biocache.ala.org.au/occurrences/search?q=lsid%3Ahttp%3A%2F%2Fid.biodiversity.org.au%2Fnode%2Fapni%2F6719673&fq=state%3A%22Australian%20Capital%20Territory%22&fq=month%3A%2203%22

PDF:

https://fieldguide.ala.org.au/download/offline/09052019-fieldguide1557385366026.pdf

fieldguide.log shows (when PDF is empty):

2019-05-09 17:15:27,782 ERROR [GenerateService] failed to get fieldGuide info from bie

nickdos commented 4 years ago

Got a related example of this via support ticket https://support.ehelp.edu.au/a/tickets/46490

Search produces empty guide: https://avh.ala.org.au/occurrences/search?q=collection_uid%3Aco54&qc=data_hub_uid%3Adh9

but if you filter on state or another facet, the field guide is complete.

This suggests there is an internal maximum limit (number of taxa to request from BIE is a guess) that is being exceeded and results in an exception or error.

Edit: I tried a couple of filtered versions, both of which had over 8000 distinct taxon_name entries and they both failed.

timhicks-ala commented 3 years ago

Another example here: https://support.ehelp.edu.au/a/tickets/106602

User has gone to Explore your area, viewed records in a 10km radius (18,222 records across 1,315 species in this case), then attempted to download a field guide for that data.

Testing so far shows:

There are also reported cases of field guides sitting and generating forever. This may be the case with larger numbers of species, even if they are technically below whatever limit exists for these in BIE.

Suggested actions:

  1. Apply a hard limit to the number of species included in a field guide. I'm not sure of the use case but 50+ pages of field guide doesn't intuitively seem useful. I would suggest 50 species max, or for queries with more, stop after the first 50 most common species in the list. This will reduce generated file volume, increase usefulness of field guides, and reduce or stop instances where guides fail to generate entirely.

  2. Increase compression/make field guide more efficient in size. The field guide produces a PDF with A4 pages, with a fairly small image on each - if the PDF is generated using the full size image every time, this will be partly responsible for the large filesizes. There may also be other high-resolution graphics included in the PDFs which are further bloating the filesize.

I would also push for some priority on this one as it's a very visible issue, and one new users frequently run into as they try out different parts of the ALA.