You might have lot of entries and group and aggregate takes time.
try with
CREATE INDEX ix1 ON `test-couchbase-ale` (`StartTimeUtc`, Event.Name);
SELECT Event.Name, count (1) as NumEvent
FROM test-couchbase-ale WHERE StartTimeUtc BETWEEN ‘2017-02-01T00:00:00Z’ AND ‘2017-03-01T00:00:00Z’
GROUP BY Event.Name ORDER BY NumEvent DESC;
I have tried to increase query timeout and i
Also checkout https://dzone.com/articles/count-amp-group-faster-using-n1ql