CredentialEngine / CredentialRegistry

Repository for development of the Credential Registry
Apache License 2.0
12 stars 10 forks source link

Gateway Timeout with large query on sandbox #690

Closed siuc-nate closed 5 months ago

siuc-nate commented 6 months ago

The following query times out on sandbox, but runs in about 4 seconds on production:

{
    "@type": "ceasn:CompetencyFramework",
    "search:termGroup": {
        "search:value": [
            {
                "search:operator": "search:orTerms",
                "ceterms:ctid": {
                    "search:value": "test",
                    "search:matchType": "search:exactMatch"
                },
                "^ceasn:isPartOf": {
                    "search:operator": "search:orTerms",
                    "ceterms:ctid": {
                        "search:value": "test",
                        "search:matchType": "search:exactMatch"
                    },
                    "ceasn:competencyLabel": "test",
                    "ceasn:competencyText": "test",
                    "ceasn:comment": "test",
                    "ceasn:conceptKeyword": "test",
                    "ceasn:codedNotation": "test"
                },
                "ceasn:creator": {
                    "search:operator": "search:orTerms",
                    "ceterms:ctid": {
                        "search:value": "test",
                        "search:matchType": "search:exactMatch"
                    },
                    "ceterms:subjectWebpage": "test"
                },
                "ceasn:publisher": {
                    "search:operator": "search:orTerms",
                    "ceterms:ctid": {
                        "search:value": "test",
                        "search:matchType": "search:exactMatch"
                    },
                    "ceterms:subjectWebpage": "test"
                },
                "ceasn:name": "test",
                "ceasn:description": "test",
                "ceasn:source": "test",
                "ceasn:conceptKeyword": "test"
            }
        ],
        "search:operator": "search:andTerms"
    }
}

It returns a timeout error in HTML. Can this at least be done in JSON so it's compatible with the consuming system?: image

excelsior commented 6 months ago

@siuc-nate You were right, sandbox was just out of sync and missing the latest performance optimizations. All of those are deployed now.

We're working on responding in the correct format when timeouts occur.

edgarf commented 5 months ago

@jeannekitchens are there any problems here? (cc @siuc-nate )

siuc-nate commented 5 months ago

The query is working now. If the timeout errors now return JSON, then we can close this.

siuc-nate commented 5 months ago

The timeout issue will be handled in another thread.