Query execution failed with error Ran out of slots in the query output buffer

Comments

9 comments

  • Avatar
    Candido Dessanti

    Hi @Ray1,

    Is this a recurrent issue? Does it happen every time you ran this query or randomly? Have you tried to use the \cpu_memory command to flush the CPU cache instead of restarting the server?

    Anyway, this issue generally happens when the guessing of number of rows returned by a query, so I can only suggest trying to turn off the parameter use-estimator-result-cache (–use-estimator-result-cache=false) as a workaround. It would be helpful to turn on the verbose parameter to give us some info to figure out the problem; I haven’t able to reproduce it right now, so a detailed log could help.

    Best Regards, Candido

    0
    Comment actions Permalink
  • Avatar
    Ray1

    Thanks Candido,

    It happened on a specific query several times before restarting the service and hasn't happened since. I'll try \cpu_memory if/when it does and get detailed logs.

    Does disabling use-estimator-result-cache affect performance?

    I wasn't aware of the \cpu_memory command, it isn't documented under \h. Is there list somewhere of all omnisql slash commands?

    Thanks for your help! Ray

    0
    Comment actions Permalink
  • Avatar
    Candido Dessanti

    Hi @Ray1,

    Nope, I mixed the command...I wanted to say \clear_cpu, it should fix a memory fragmentation problem, while in this case, it's unlikely; the command will clear the memory CPU cache, so everything has to be re-read from disk.

    To reply to your second question; yes, it could affect the performances because it suppresses the caching of estimator queries, but it's worth using it, if the issue is a recurring one.

    0
    Comment actions Permalink
  • Avatar
    ldnker

    Hi @candido.dessanti ,

    I just ran into the same issue.

    We ran both \clear_cpu and \clear_gpu but are still getting the " Ran out of slots in the query output buffer" issue.

    Could you advise whether there is anything else that we could try?

    0
    Comment actions Permalink
  • Avatar
    Candido Dessanti

    Hi @ldnker,

    The other thing you can try is to disable the estimator' cache with the parameter use-estimator-result-cache, but this will affect the performances; anyway also with this parameter, you can incur this issue, but our engineers are aware of the problem, and they identified some scenarios that could lead to this error, so it's likely that fixes are on the way, while I'm not sure that it ill cover your scenario.

    can you describe what you are doing in the system? (modifying data? just querying a read-only database?)

    regards, Candido

    0
    Comment actions Permalink
  • Avatar
    ldnker

    Hi, okay thank you. This omnisci instance is running two databases. One is mainly read only geospatial information and the other one is regularly fed new data that is then joined.

    The second database is not especially large (about 30 million rows per table max). However, the query that results in this issue unfortunately has a large number of group by statements. If I leave those out it does seem to work.

    If it helps I would happy to send the exact queries to you.

    1
    Comment actions Permalink
  • Avatar
    Candido Dessanti

    thanks, @ldnker

    if you can share the query with us would probably help us in reproducing your exact issue, while I know there is a strict correlation with the underlying data.

    are you getting those errors also with the use-estimator-result-cache turned to false?

    Regards, Candido

    0
    Comment actions Permalink
  • Avatar
    ldnker

    Hi Candido, Sorry I was off this project for a bit.

    I just tried it again and the query worked. If this error arises again I will let you know.

    Again sorry for not being able to be more specific!

    Best Frederic

    0
    Comment actions Permalink
  • Avatar
    Candido Dessanti

    Don't worry, as I wrote to you in private, in the upcoming version there are some fixes to the issue. I am not sure those fixes are covering every possible scenario that would raise the error, but the test case was quite similar to the one you described in the thread.

    Best, Candido

    0
    Comment actions Permalink

Please sign in to leave a comment.