Tell InfluxDB To Drop Queries That Took Longer than some time

Is there a way to tell influxdb to drop queries that took longer than some time for example 10s. If a query won’t resolve in 10s, don’t keep trying it. I just run a really bad query and it ate up all the available ram and server went laggy. I restarted the influxdb container to drop the ongoing query.

Any solution/suggestion on this topic?

Hello @Mert,
What version are you using. Perhaps this is useful to you? InfluxQL query management | InfluxDB OSS 1.8 Documentation
I’m not sure how to trigger a kill based off the duration of execution time of a query though if that’s what you’re asking. Is that what you’re asking? or did the link above help? Thank you.

1 Like

Thanks for the link. It might help in a similar situation in the future. Yet, I was asking about “creating a rule to drop the query automatically” and return some error like ‘it took so long?’. I don’t know if it’s a valid question but without a check or action mechanism I can send something really garbage as a query.

1 Like