6. The line $y=2 x$ intersects the curve
$$
(8 \sin \theta+\cos \theta+1) y=2(2 \sin \theta-\cos \theta+3) x^{2}
$$

to form a chord of maximum length of $\qquad$ .
$6.8 \sqrt{5}$.
Obviously, the origin is an intersection point.
Substituting $y=2 x$ into the curve equation, we get
$$
(2 x-8) \sin \theta-(x+1) \cos \theta=1-3 x
$$

For $\theta$ to have a solution, then
$$
(x+1)^{2}+(2 x-8)^{2} \geqslant(3 x-1)^{2} \text {. }
$$

Solving this, we get $-8 \leqslant x \leqslant 2,|x|_{\text {max }}=8,|y|_{\text {max }}=16$.
Thus, the maximum chord length is $d=\sqrt{8^{2}+16^{2}}=8 \sqrt{5}$.