  Consider the diffusive Hamilton-Jacobi equation $$u_t-\Delta u=|\nabla
u|^p+h(x)\ \ \text{ in } \Omega\times(0,T)$$ with Dirichlet conditions, which
arises in stochastic control problems as well as in KPZ type models. We study
the question of the gradient blowup rate for classical solutions with $p>2$.
  We first consider the case of time-increasing solutions. For such solutions,
the precise rate was obtained by Guo and Hu (2008) in one space dimension, but
the higher dimensional case has remained an open question (except for radially
symmetric solutions in a ball). Here, we partially answer this question by
establishing the optimal estimate $$C_1(T-t)^{-1/(p-2)}\leq \|\nabla
u(t)\|_{\infty} \leq C_2(T-t)^{-1/(p-2)} \tag{1}$$ for time-increasing gradient
blowup solutions in any convex, smooth bounded domain $\Omega$ with $2<p<3$. We
also cover the case of (nonradial) solutions in a ball for $p=3$. Moreover we
obtain the almost sharp rate in general (nonconvex) domains for $2<p\le 3$. The
proofs rely on suitable auxiliary functionals, combined with the following, new
Bernstein-type gradient estimate with sharp constant: $$|\nabla u|\le
d_\Omega^{-1/(p-1)}\bigl(d_p+C d_\Omega^\alpha\bigr)
  \ \ \text{ in } \Omega\times(0,T),\qquad d_p=(p-1)^{-1/(p-1)},
  \tag{2}$$ where $d_\Omega$ is the function distance to the boundary. This
close connection between the temporal and spatial estimates (1) and (2) seems
to be a completely new observation.
  Next, for any $p>2$, we show that more singular rates may occur for solutions
which are $\textit{not}$ time-increasing. Namely, for a suitable class of
solutions in one space-dimension, we prove the lower estimate
$\|u_x(t)\|_\infty \geq C(T-t)^{-2/(p-2)}$.
