Error: Incorrect parameter for prepared name in encoded plan

@krishan.jangid normally when you restart the app server the plans should not vanish from the server .But depending on your code the app might just recreate the plans and therefore use new names.

You can always call invalidateQueryCache on the bucket which will clean out the cache too (and if you hook it up via something like JMX or on a http endpoint only listening on a privileged url/localhost you can even call it while running).

The property @Marco_Greco is talking about is a system property called “com.couchbase.query.encodedPlanEnabled” which is set to true by default. If you set this to false before creating a Cluster instance it will switch over to a different approach but we are not recommending this for production because it would not automatically re-prepare on nodes that are added to the cluster and is just an experimental feature at this point.