CDLUC3 / ezid

CDLUC3 ezid
MIT License
11 stars 4 forks source link

Modify EZID to limit search keywords and return results size #446

Open jsjiang opened 1 year ago

jsjiang commented 1 year ago

Modify EZID's search function to limit:

  1. the length of search keywords that passes to the query - system failure due to long search keywords #421
  2. the number of matched search results - large search results may Search unresponsive and causes timeout # 373
jsjiang commented 1 year ago

Note: Advanced search with "object_type=PhysicalObject" and "id_type=doi" triggered timeout error (504) on both prd (found from application log) and stage (tested).

Search URL: https://uc3-ezid-ui-prd.cdlib.org:443/search?publisher=&object_type=PhysicalObject&creator=&title=&pubyear_from=&keywords=&filtered=t&identifier=&pubyear_to=&id_type=doi

log entries: EZID: 023-08-01 10:11:30,859 INFO log.begin:133: 756c6528308e11ee9ce00a0c7ad0442b BEGIN search/count - anonymous anonymous anonymous anonymous publicSearchVisible True identifierType doi resourceType PhysicalObject

Apache: 172.31.57.208 - - [01/Aug/2023:10:11:30 -0700] "GET /search?filtered=t&keywords=&identifier=&title=&creator=&publisher=&pubyear_from=&pubyear_to=&object_type=PhysicalObject&id_type=doi HTTP/1.1" 504 247 "https://ezid-stg.cdlib.org/search" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36"

jsjiang commented 1 year ago

Related issue #472 (repeated large searches caused low memory on RDS and resulted with RDS server reboot)