  For each prime $p$, let $I_p \subset \mathbb{Z}/p\mathbb{Z}$ denote a
collection of residue classes modulo $p$ such that the cardinalities $|I_p|$
are bounded and about $1$ on average. We show that for sufficiently large $x$,
the sifted set $\{ n \in \mathbb{Z}: n \pmod{p} \not \in I_p \hbox{ for all }p
\leq x\}$ contains gaps of size at least $x (\log x)^{\delta} $ where
$\delta>0$ depends only on the density of primes for which $I_p\ne \emptyset$.
This improves on the "trivial" bound of $\gg x$. As a consequence, for any
non-constant polynomial $f:\mathbb{Z}\to \mathbb{Z}$ with positive leading
coefficient, the set $\{ n \leq X: f(n) \hbox{ composite}\}$ contains an
interval of consecutive integers of length $\ge (\log X) (\log\log X)^{\delta}$
for sufficiently large $X$, where $\delta>0$ depends only on the degree of $f$.
