Help! My queries are returning with an error: 'Resource temporarily unavailable'

Highlighted
Enthusiast

Help! My queries are returning with an error: 'Resource temporarily unavailable'

Screenshot of the error pictured below. How do I fix this?Pasted image at 2017_02_14 12_53 PM.png

 

 

 

 

1 REPLY
Inquirer

Re: Help! My queries are returning with an error: 'Resource temporarily unavailable'

Congrats! You managed to construct a query so complex it required more resources than we usually allow for queries, which is set at 8GB of memory for each shard.

There are several things you could do, two of which are:

1. Increase your cluster size and rebalance your cluster. This isn't terribly hard to do, but requires you to add new servers.

2. You can increase this memory limit. This memory limit was designed with concerns for impact for other queries in mind: if one complex query takes too much resources, it will starve out and slow down other faster queries (which might be more important complete). However, if you are sure you need this query to succeed and have extra memory on your servers, you can increase this memory limit and let the query run. To do so, use either the Interana CLI or directly log on to the mysql server to change the application setting. Specifically, you need to set:

application_name, key, value : query_api, query_memory_limit_mb, (your desired amount in MB).

With the CLI, the instruction is simple:
ia settings update query_api query_memory_limit_mb (insert your memory amount)