Skip to content
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

Error "Bad Request: invalid request" with large body request to qryn #487

Open
mk-raven opened this issue Mar 26, 2024 · 3 comments
Open

Comments

@mk-raven
Copy link

mk-raven commented Mar 26, 2024

When doing a big query request in loki api by all values in labels, there was error massage:

{"level":50,"time":1711468950014,"pid":19,"hostname":"qryn-read-545cb58978-k654s","name":"qryn","reqId":"req-2vj","err":"invalid request\nBad Request: invalid request\n at module.exports.transpile (/app/parser/transpiler.js:141:11)\n at scanFingerprints (/app/lib/db/clickhouse.js:248:29)\n at Object.handler (/app/lib/handlers/query_range.js:41:28)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","msg":"invalid request"}
In request about 3250 characters and starts by:
req":{"method":"GET","url":"/loki/api/v1/query_range?direction=backward&end=1711468949462000000&limit=3000 ...

Its could be problem with limits body size or something else..

@lmangani
Copy link
Collaborator

Thanks for the report! Looks like any other invalid request so if you're positive it was not somehow truncated we should investigate. Since this was a query, could you show us the query causing this error or does it contain something fancy?

@deathalt
Copy link
Contributor

deathalt commented Mar 27, 2024

this happens on the log dashboard when the All variable is added.
the query looks like this

{k8s_cluster_name="cluster1", k8s_namespace_name=~"service1|service2|service3|service|service4|service5|service6|service7|service8|service9|service10|service11|service11|service12|service13|service14|service15|service15|service16|service17|service18|service19|service20|service21|service22|service23|service24service|service25|service26|service27|service28", level="WARN"} |= "" | json body="body"

If there are fewer services, the query works without errors.

@akvlad
Copy link
Collaborator

akvlad commented Apr 10, 2024

@deathalt @mk-raven should be fixed in 3.2.18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants