CDLUC3 / ezid

CDLUC3 ezid
MIT License
10 stars 4 forks source link

Initial query of ARKs result in timeout 504 Gateway Timeout Error - Increase ALB timeout #148

Closed marisastrong closed 3 years ago

marisastrong commented 3 years ago

If a search on the https://ezid.cdlib.org/search page has not occurred in some time, the query can timeout resulting in a 504 Gateway timeout error. Subsequent queries do not trigger the error since there appears to be caching occurring.

Suggestion to increase the timeout on the ALB to alleviate the initial query error.

Long term, optimize the query to be more performant.

mariagould commented 3 years ago

@marisastrong here are my initial results attempting to reproduce:

I tested on Chrome and Safari while logged in and not logged in. The last time I ran a search in EZID was at least a week ago.

I was not able to reproduce the gateway timeout error. I did notice that the results seemed to be slower when the initial slash in the ARK was included in the query.

Not logged in:

Logged in as Admin

mreyescdl commented 3 years ago

Saw this ticket and thought I'd attempt again. It timed out with the following message on first try. Second attempt worked.

504 Gateway Time-out

I performed:

It is possible that this timeout only occurs with large collections, like Merritt.

mariagould commented 3 years ago

Hi Mark - thanks for sharing this. Can you confirm if you used the search available in the main nav (e.g., https://ezid.cdlib.org/search - accessed via the magnifying glass icon at the top of the window) or just the search bar in "Manage IDs"? (see screenshot) If you haven't tried the main search, can you do this as well and let me know what happens? Can you also please share the specific ARK(s) you searched for?

Screen Shot 2021-08-24 at 4 25 57 PM

marisastrong commented 3 years ago

Tried this ARK in Manage IDs page (logged in as Merritt user) ark:/13030/m5gr3bk6

504 Gateway Timeout message with this URL:

https://ezid.cdlib.org/manage?ps=10&order_by=c_update_time&sort=asc&owner_selected=user_merritt&c_title=t&c_creator=t&c_identifier=t&c_owner=t&c_create_time=t&c_update_time=t&c_id_status=t&keywords=ark%3A%2F13030%2Fm5gr3bk6&identifier=&title=&creator=&publisher=&pubyear_from=&pubyear_to=&object_type=&target=&id_type=&create_time_from=&create_time_to=&update_time_from=&update_time_to=&id_status=

ARK-ManageIDs-Search

Tried again in Main Search page

ARK-Main-Search

~24s ARK returned without error https://ezid.cdlib.org/search?filtered=t&keywords=ark%3A%2F13030%2Fm5gr3bk6&identifier=&title=&creator=&publisher=&pubyear_from=&pubyear_to=&object_type=&id_type=


Ran ARK search again from the Manage IDs page and it did not error out, however the query took about 47s to return result.

mariagould commented 3 years ago

Attempt at reproducing with Marisa's example ARK (ark:/13030/m5gr3bk6):

In Chrome: Not logged in, using search button in top nav

  1. Result returned in ~35 seconds
  2. Attempting again a few minutes later: result returned in ~8 seconds
  3. Attempting again a few minutes later, removing first slash: result returned in ~4 seconds

In Safari: Logged in, using search button in top nav

  1. Result returned in ~8 seconds
  2. Attempting again a few minutes later: result returned in ~10 seconds
  3. Attempting again a few minutes later, removing first slash: result returned in ~4 seconds

Trying a different ARK: ark:/13030/qt2hm8m5x0 Firefox: Logged in, using search button in top nav

  1. Removing first slash: result returned in ~4 seconds
  2. Adding slash: result returned in ~8 seconds

Same as above with ark:/13030/qt64f2j4tt As above, searching with the slash doubled the response time

datadavev commented 3 years ago

Closing this as resolved by release 2.0.4.1 deployed to production 2021-10-28