dzagieboylo,
it’s a https://issues.couchbase.com/browse/MB-17231
See my post: Couchbase 4.0 community huge delay returning result with “full ejection” set
public workaroud: do not use “full eviction” for bucket
IMHO, this makes 4.0.0 CE completely unusable for configurations with 512…1G RAM