-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Islandora link headers grow unbounded #1764
Comments
Hey @bseeger, I think @kayakr has stumbled into this before as well. So we do that to try and be as "RESTful" as possible while still conforming to web standards, but I dunno how many people (er... client softwares) are making use of it. We use some link headers in the backend to get things into Fedora, but certainly not all. The ones generated by your standard entity references (member or, media of, tags, etc...) don't come into play at all as far as Islandora is concerned. I'm happy to either
I'm open to other suggestions, too. In the very least, or maybe just as a stop-gap measure, we can document the issue and suggest workarounds for nginx/apache. |
Right now, it's unclear to me:
Right now, it seems the information these link headers convey is limited. i.e. they're all It would seem ideal if they were configurable somehow. Maybe we want to simply un-check a checkbox to turn them off entirely. Maybe others might want to specify which taxonomies they wanted to include, or use a different rel ( |
@bseeger I'm curious as to how they're getting duplicated. Are you tagging twice or do we just have a bug there. @birkland It's provided by the main islandora module as an attempt to provide links to relevant items in message headers. The idea is that you'd be able to navigate the repository using just HEAD requests until you find what you want. I don't know who's actually using it, though. And our own backend, which I'd consider the main client / user of this feature, doesn't really use it much at all. I think in terms of concrete steps forward, we can definitely
But if no one really is using this at all and it's more of a nuisance than anything else, we can totally deprecate and remove it. If we make it toggleable, and no one uses that toggle and everyone just sets it to off and walks away.... then we don't actually need to maintain that code at all. |
I can see why link headers are potentially useful, but it was a tricky issue to diagnose when we encountered it for the first time, and nginx has quite a low allowance by default (64 I think). See previously #1519 Islandora generates Link headers for non-repository content |
@dannylamb - I totally double tagged things (on purpose just to have a number of links in there). Here's the record: http://future.islandora.ca/node/40 |
@dannylamb points out that
If that's the case, couldn't a REST client use the JSON-LD for a node to do the same thing, using GET requests? If so, would we need all those link headers at all? |
@bseeger Good to know it's not a bug, just a use case that was never considered. Didn't plan on folks tagging twice. @mjordan Good point. Everything we're exposing is in the jsonld already. The advantage would be that you don't have to pull down the whole record and can get by with just HEAD requests, which would be faster. But considering this has inconvenienced more people than those who have taken advantage of the feature, frankly I don't think it's even worth it at this point. |
I completely agree. I'd gladly sacrifice the link headers for more reliability, especially when we have similar functionality that doesn't have nasty side effects. Would be happy to hear alternative points of view though. |
I have also recently come up against this nginx header limit being overcome by Link headers added by an entity_reference field. I think in the short term I'm going to ask for the http_max_hdr limit to be increased on the server. Long term I suggest removing Link headers for non-Islandora objects or allowing site administrator to configure which entity types/fields are used to generate Link headers. |
Workaround implemented in Islandora Workbench is to set Requests' max headers to 10,000 (from default of 100 headers). |
Every time we add an entity reference to a node, we get another link header (Subjects, Resource Type, Genre, Contributor -- anything referencing a taxonomy term). This overall makes sense, but means the link headers can grow unbounded and potentially run into external limits. Once we had our metadata application profile in place and started testing nodes, we ran into header buffer size limits in NGINX and started getting HTTP 502 Bad Gateway errors. The limits are easily upped, but the headers can still grow.
Islandora itself doesn't concern itself with how it's deployed, really, so this ticket is about should we have all these link headers? Do they add value? Can we de-dup them? How much control over them do we have in the first place?
The system functions overall, but nodes with enough entity reference that hit this limit return 502's. It is a nasty little bug to run into when you suddenly start getting 502's for one node and not another. I'm not sure if there is an easy fix here, so this is more of a conversation starter and to make folks aware about these headers.
The text was updated successfully, but these errors were encountered: