I am trying the retrieve pages with disease → targets associations. Some pages work, then every time, after a while, I get a 502 Error Bad Gateway. I am cautious of not getting my IP blocked, so I prefer to turn to the community for help, instead of trying to brute force this.
Note that I am asking quite a bit of data about the targets: id, symbol, but also
biotype,
chemicalProbes,
dbXrefs,
functionDescriptions,
geneticConstraint,
genomicLocation,
geneOntology,
homologues,
pathways,
proteinIds,
safetyLiabilities,
subcellularLocations,
targetClass,
tep,
tractability,
transcriptIds,
similarEntities,
literatureOcurrences,
expressions,
knownDrugs,
The BigQuery way is not an option at this stage, nor is the full data download.
Am I asking for too much data?
Thank you for reporting this issue! However, to troubleshoot we would need the exact pages that are throwing the 502, or the query that you are using. (Are you using the API?)
For mid-size queries fetching data from API is fine. I don’t expect your queries being blocked because of extensive usage. We are taking a look.
I have been running into the same “502 - server temporarily unavailable error” both when doing a query via R (httr2 package) and I get “JSON Parse error: Unrecognized token ‘<’” when querying via the playground.
Please, find the query below:
query associatedTargets {
disease(efoId: "EFO_0003767") {
id
name
children {
id
name
}
associatedTargets {
rows {
target {
id
approvedSymbol
approvedName
knownDrugs {
uniqueDrugs
rows {
drug {
id
name
drugType
maximumClinicalTrialPhase
approvedIndications
indications {
rows {
disease {
id
name
}
maxPhaseForIndication
}
}
}
}
}
}
score
datatypeScores{
id
score
}
}
}
}
}
I have attempted the query a couple of times (~ 50 - 100) over two weeks and sometimes it works, but more often than not I get the 502 error. Using automatic retries in R does not help either. Since some of the queries are made from an HPC environment and some from my personal laptop, I do not think the failure is related to throttling. Nevertheless, it would be great it you could let me knot whether this might be the issue.
I would very much appreciate any feedback on what might be the problem and how to solve it.
It’s an ongoing issue we have with our Elastic Search backend that we haven’t been able to reproduce, so we are walking in the dark there.
As an aside, would you mind providing more details on your activities around the platform (web and/or API) when you find this ‘502 - Bad Gateway’ error? It would be really helpful.
I have only encountered the error when accessing the platform via the GraphQL API either in R (httr2 package) or via the playground. In R I do get the 502 error, and on the playground I get a json file parsing error.
Interestingly, the error does not persist for all the time, but the server seems to be available every now and then.
Hi! I’m getting this error while calling the API. I was using the same code last week and I got the correct results but now I’m getting 502 error. Do you know why this could be?