"Received error 500 when contacting the query service on this node"

When we click on the Query Service in Couchbase server 5.0.1 --> it returns a “Received error 500 when contacting the query service on this node” --> this node does have query service configured on it.

Also this problem is intermittent (sometimes it happens sometimes it doesn’t)

Can someone help?

This is couchbase version:
Enterprise Edition 5.0.1 build 5003

Did your query service is restarted. Check query.log . Also check OS message log any Out Of Memory errors.