Lot of completed requests found to be in fatal state

Hi

The completed_request shows many N1QL’s found to be in fatal state
with errorCount =1 , no underlying statement is listed for all fatal requests

error shows like this
[{“code”:4040,“key”:“plan.build_prepared.no_such_name”,“message”:“No such prepared statement: 8692d139-85bc-5c6f-920e-89e028ccddf0”}]

what can be causing this error

The request didn’t list a statement but passed the “prepared” parameter to identify the statement to execute; the identifier passed doesn’t exist (i.e. there is no prepared statement with that identifier).

Causes could be:

  • The application never prepared the statement.
  • The application has the wrong prepared identifier.
  • Someone deleted the prepared statement (from system:prepareds).

You may want to consult the documentation for more on prepared statements:

https://docs.couchbase.com/server/current/guides/prep-statements.html

and request parameters:

https://docs.couchbase.com/server/current/n1ql/n1ql-manage/query-settings.html#section_nnj_sjk_k1b

HTH.