4. In the tetrahedron $P-ABC$, the projection of vertex $P$ on the base is the orthocenter $O$ of $\triangle ABC$, and the midpoint of $PO$ is $M$. A section $\alpha$ is made through $AM$ parallel to $BC$, and let $\angle PAM = \theta_{1}$, the acute dihedral angle between $\alpha$ and the base $ABC$ is $\theta_{2}$. When $\theta_{1}$ is maximized, the value of $\tan \theta_{2}$ is $\qquad$.
4. $\frac{\sqrt{2}}{2}$.

Draw a line $l$ through point $A$, such that it is the intersection line of plane $\alpha$ and plane $ABC$.
Since $BC \parallel \alpha, BC \subset$ plane $ABC$, therefore, $l \parallel BC$.
Also, $PO \perp$ plane $ABC$, and $O$ is the orthocenter, so $AO \perp BC$.
Hence, $AO \perp l$.
By the theorem of three perpendiculars, we know $PA \perp l$.
Thus, $\theta_{2}=\angle OAM$.
Therefore, the problem is equivalent to: In the right triangle $\triangle PAO$, the midpoint of $PO$ is $M$, $\angle AOP=90^{\circ}$, $\theta_{1}=\angle PAM$, $\theta_{2}=\angle OAM$, when $\theta_{1}$ is maximized, find the value of $\tan \theta_{2}$.
Let $AO=1, PO=2a, \theta_{3}=\angle PAO$. Then $\tan \theta_{2}=a, \tan \theta_{3}=2a$.
Thus, $\tan \theta_{1}=\tan \left(\theta_{3}-\theta_{2}\right)=\frac{a}{1+2a^{2}} \leqslant \frac{\sqrt{2}}{4}$, when $a=\frac{\sqrt{2}}{2}$, the equality holds, at this time, $\tan \theta_{2}=\frac{\sqrt{2}}{2}$.