Internal server error on query

Hi, we are running a relatively simple N1QL query. On the server side it executes fairly quickly: elapsed: 546.1ms execution: 546ms docs: 496 size: 24323898 bytes . Note the document size. We do get a warning about displaying a large document, but it succeeds. There is however a warning visible under the query editor: code 5000, msg: "open [path]/var/lib/couchbase/tmp/scan-results320542079205: no such file or directory ".

When we execute it through the .net SDK 3.1.4 we consistently get an internal server error.

Once we limit the return size to about 2/3 ( add LIMIT 350) we consistently get results back in the SDK. Also: with the limit the query editor no longer displays the warning.

Does the SDK impose some sort of additional size limit on the returned document? Or is this an issue with some sort of failure on the scan document with larger results?

Welcome back to the forum!

As in, the error returned is a 5000 from the Query Service in the result? Or do you mean some other error that you’re then passing back through ASP.NET or something like that which is an internal server error.

If it’s an error in the result returned, the error is contained to the query service, not an imposed limit at the client.

Guessing that it’s not the case, then it could be something to do with our incremental parsing of the results. Any chance you can turn up the log level and capture some info to file an NCBC at If you can’t because of the data, perhaps give us an idea of the object complexity, whether or not you’re using dynamic objects, and what options/config you’re using when making the query call and we can try to repro.

Above error is returned by indexer client. @jeelan.poola

Thank you! We found that a wrong path was entered for the tmp directory. After fixing that it has straightened itself out.

1 Like

We found an issue with the tmp directory configuration. My guess is that the query engine does not always utilize scan files, only for certain queries. Whenever it did try to utilize a scan file, the error would occur. Awkwardly enough, the query still executed in the query editor with just some errors/warnings (need to click on the orange triangle to see them), while queries posted through the SDK failed with a generic error.

1 Like

scan files are used when indexer produced results fast and query consuming results slowly, when pending items reached above certain limit. By that time it produced some results and streamed.