For each prime p, let Ip⊂Z/pZ denote a collection of residue classes modulo p such that the cardinalities ∣Ip∣ are bounded and about 1 on average. We show that for sufficiently large x, the sifted set {n∈Z:n(modp)∈Ip for all p≤x} contains gaps of size at least x(logx)δ where δ>0 depends only on the density of primes for which Ip=∅. This improves on the "trivial" bound of ≫x. As a consequence, for any non-constant polynomial f:Z→Z with positive leading coefficient, the set {n≤X:f(n) composite} contains an interval of consecutive integers of length ≥(logX)(loglogX)δ for sufficiently large X, where δ>0 depends only on the degree of f.