NCATSTranslator / minihackathons

MIT License
5 stars 5 forks source link

Unsecret no results Workflow A.9 #212

Closed vgardner-renci closed 3 years ago

vgardner-renci commented 3 years ago

https://github.com/NCATSTranslator/minihackathons/blob/main/2021-12_demo/workflowA/A.9_EGFR_advanced.json

image


{
  "description": "Success. 0 results.",
  "logs": [
    {
      "level": "INFO",
      "message": "Query time: 8233ms"
    },
    {
      "level": "INFO",
      "message": "MolePro results: 0"
    },
    {
      "level": "INFO",
      "message": "MolePro response status: #\"HTTP/1.1 200 OK\""
    }
  ],
  "message": {
    "knowledge_graph": {
      "edges": {},
      "nodes": {}
    },
    "results": []
  },
  "query_graph": {
    "edges": {
      "e0": {
        "object": "n1",
        "predicates": [
          "biolink:decreases_abundance_of",
          "biolink:decreases_activity_of",
          "biolink:decreases_expression_of",
          "biolink:decreases_synthesis_of",
          "biolink:increases_degradation_of",
          "biolink:disrupts",
          "biolink:entity_negatively_regulates_entity"
        ],
        "subject": "n0"
      }
    },
    "nodes": {
      "n0": {
        "categories": [
          "biolink:SmallMolecule"
        ],
        "constraints": [
          {
            "id": "biolink:highest_FDA_approval_status",
            "name": "highest FDA approval status",
            "operator": "==",
            "value": "regular approval"
          }
        ],
        "name": "Small Molecule"
      },
      "n1": {
        "ids": [
          "NCBIGene:1956"
        ],
        "name": "EGFR"
      }
    }
  },
  "status": "Success",
  "validation_result": {
    "message": "",
    "n_edges": 0,
    "n_nodes": 0,
    "provenance_summary": {
      "n_sources": 0,
      "predicate_counts": {},
      "provenance_counts": {}
    },
    "size": "2 kB",
    "status": "PASS",
    "version": "1.1.1"
  },
  "araxui_provider": "ARS",
  "araxui_response": "bbfd8a57-5346-4f1d-a98b-d941265274e1"
}
vgardner-renci commented 3 years ago

https://arax.ncats.io/?source=ARS&id=4cf33cb6-286e-4522-bcfc-a5722c5cb4b6

image


{
  "callback": "http://0.0.0.0:8000/ars/api/messages/4cf33cb6-286e-4522-bcfc-a5722c5cb4b6",
  "logs": [
    {
      "level": "INFO",
      "message": "ARS info: <html>\r\n<head><title>504 Gateway Time-out</title></head>\r\n<body>\r\n<center><h1>504 Gateway Time-out</h1></center>\r\n</body>\r\n</html>\r\n"
    },
    {
      "level": "INFO",
      "message": "ARS info: tr_ars.Server: awselb/2.0"
    },
    {
      "level": "INFO",
      "message": "ARS info: tr_ars.Date: Fri, 13 Aug 2021 13:44:53 GMT"
    },
    {
      "level": "INFO",
      "message": "ARS info: tr_ars.Content-Type: text/html"
    },
    {
      "level": "INFO",
      "message": "ARS info: tr_ars.Content-Length: 132"
    },
    {
      "level": "INFO",
      "message": "ARS info: tr_ars.Connection: keep-alive"
    },
    {
      "level": "INFO",
      "message": "ARS info: tr_ars.reason: Gateway Time-out"
    },
    {
      "level": "INFO",
      "message": "ARS info: tr_ars.url: https://medikanren-trapi.ci.transltr.io/query"
    }
  ],
  "message": {
    "query_graph": {
      "edges": {
        "e0": {
          "object": "n1",
          "predicates": [
            "biolink:decreases_abundance_of",
            "biolink:decreases_activity_of",
            "biolink:decreases_expression_of",
            "biolink:decreases_synthesis_of",
            "biolink:increases_degradation_of",
            "biolink:disrupts",
            "biolink:entity_negatively_regulates_entity"
          ],
          "subject": "n0"
        }
      },
      "nodes": {
        "n0": {
          "categories": [
            "biolink:SmallMolecule"
          ],
          "constraints": [
            {
              "id": "biolink:highest_FDA_approval_status",
              "name": "highest FDA approval status",
              "operator": "==",
              "value": "regular approval"
            }
          ],
          "name": "Small Molecule"
        },
        "n1": {
          "ids": [
            "NCBIGene:1956"
          ],
          "name": "EGFR"
        }
      }
    }
  },
  "validation_result": {
    "message": "Returned response is not TRAPI: <html>\r\n<head><title>504 Gateway Time-out</title></head>\r\n<body>\r\n<center><h1>504 Gateway Time-out</h1></center>\r\n</body>\r\n</html>\r\n",
    "size": "2 kB",
    "status": "NA",
    "version": "1.1.1"
  },
  "araxui_provider": "ARS",
  "araxui_response": "4cf33cb6-286e-4522-bcfc-a5722c5cb4b6"
}
webyrd commented 3 years ago

I reset the Unsecret Agent endpoint, and re-ran the query. The query immediately returned, with 0 answers:

{"description":"Success. 0 results.","logs":[{"level":"INFO","message":"Query time: 8ms"},{"level":"INFO","message":"MolePro results: 0"},{"level":"INFO","message":"MolePro response status: #\"HTTP/1.1 200 OK\""}],"message":{"knowledge_graph":{"edges":{},"nodes":{}},"results":[]},"query_graph":{"edges":{"e0":{"object":"n1","predicates":["biolink:decreases_abundance_of","biolink:decreases_activity_of","biolink:decreases_expression_of","biolink:decreases_synthesis_of","biolink:increases_degradation_of","biolink:disrupts","biolink:entity_negatively_regulates_entity"],"subject":"n0"}},"nodes":{"n0":{"categories":["biolink:SmallMolecule"],"constraints":[{"id":"biolink:highest_FDA_approval_status","name":"highest FDA approval status","operator":"==","value":"regular approval"}],"name":"Small Molecule"},"n1":{"ids":["NCBIGene:1956"],"name":"EGFR"}}},"status":"Success"} http_code=200%

However, earlier tonight I noticed the same exact query timing out.

I suspect this is an issue with the new endpoint. I need to do more testing to understand what is going on--so far, the 504 error vs. immediate return of 0 answers doesn't seem reliably reproducible.

Will fix before the relay.

webyrd commented 3 years ago

After further investigation, it appears that the gateway times out after 60 seconds.

However, the TRAPI server timeout is for 10 minutes. So, the Unsecret Agent TRAPI server ends up running for an extra 9 minutes, during which it can't handle additional queries.

This may be an nginx configuration issue.

I will look into the issue, and fix it before the relay.

vgardner-renci commented 3 years ago

https://arax.ncats.io/?source=ARS&id=c9c02a08-5574-45e2-836c-cf16f95fa964

vgardner-renci commented 3 years ago

https://arax.ncats.io/?source=ARS&id=eaef59d1-ad7c-423c-b67d-ec02ca227cd4

vgardner-renci commented 3 years ago

Query retired from WF-A