RobokopU24 / Feedback

Feedback on the ROBOKOP project
https://robokop.renci.org
0 stars 0 forks source link

Timeout (port:8080) issues - Improve error messaging #215

Open karafecho opened 2 months ago

karafecho commented 2 months ago

This issue is intended to consolidate three related issues: #181, #184, #195.

Queries that are multi-hop or complex or that use generic predicates often timeout after running for a long time. The following error message appears very briefly:

image

This is a performance issue, not a port issue per se.

Note that it's hard to reproduce the issue because sometimes (but not always) a query will run if it's posted at a later date.

EvanDietzMorris commented 2 months ago

The second part of this is #201 #204

karafecho commented 2 months ago

Yes! Thanks for referencing those issues.

Woozl commented 2 months ago

Thanks for consolidating these. Currently aragorn is broken, so that message actually makes sense at the moment. However, I sympathize that this message shows up too much. The error handling code in the UI is a little bit overreaching, basically if any error happens for any reason in the data fetch process, this message will show up.

This can definitely be improved; however, as Evan mentioned in a similar linked issue, there are geniunely times where the UI doesn't know what went wrong, so we'll have to keep this in mind or update the backend to provide more detailed responses when an error occurs.

EvanDietzMorris commented 2 months ago

Yea, it's a tough issue. I will work with David on improving the error messages, and some of that will have to happen upstream in Aragorn/Plater. Aside from that, but related, we should nail down exactly what the timeout interval we want is, and to verify it's being applied at the right stage of the process, which will allow a better timeout message.

karafecho commented 2 months ago

Just received another port:8080 timeout in response to this simple two-hop query, which I know returns responses.

{
  "message": {
    "query_graph": {
      "nodes": {
        "n0": {
          "name": "Carbon Monoxide",
          "categories": [
            "biolink:ChemicalOrDrugOrTreatment",
            "biolink:MolecularEntity",
            "biolink:ChemicalEntity",
            "biolink:ChemicalEntityOrProteinOrPolypeptide",
            "biolink:ChemicalEntityOrGeneOrGeneProduct",
            "biolink:PhysicalEssence",
            "biolink:SmallMolecule",
            "biolink:NamedThing",
            "biolink:PhysicalEssenceOrOccurrent"
          ],
          "ids": [
            "PUBCHEM.COMPOUND:281"
          ]
        },
        "n1": {
          "categories": [
            "biolink:Gene"
          ],
          "name": "Gene"
        },
        "n2": {
          "name": "multiple sclerosis",
          "categories": [
            "biolink:Disease",
            "biolink:DiseaseOrPhenotypicFeature",
            "biolink:BiologicalEntity",
            "biolink:ThingWithTaxon",
            "biolink:NamedThing",
            "biolink:Entity"
          ],
          "ids": [
            "MONDO:0005301"
          ]
        }
      },
      "edges": {
        "e0": {
          "subject": "n0",
          "object": "n1",
          "predicates": [
            "biolink:related_to"
          ]
        },
        "e1": {
          "subject": "n1",
          "object": "n2",
          "predicates": [
            "biolink:related_to"
          ]
        }
      }
    }
  }
}

Importantly, note that I ran it a second time and did not receive an error message but instead was told that my answer was ready but no results.