8. Given the sequence $\left\{x_{n}\right\}$ satisfies:
$$
x_{1}=a, x_{2}=b, x_{n+2}=3 x_{n+1}+2 x_{n} \text {. }
$$

If there exists an integer $k \geqslant 3$, such that $x_{k}=2019$, then the number of ordered positive integer pairs $(a, b)$ is $\qquad$ .
8. 370 .

From the problem, we know the sequence $\left\{x_{n}\right\}$ is
$$
a, b, 2 a+3 b, 6 a+11 b, 22 a+39 b, 78 a+
$$
$139 b, 278 a+495 b, \cdots$
When $2 a+3 b=2019$, we have
$$
a=3 t_{1}, b=673-2 t_{1}\left(1 \leqslant t_{1} \leqslant 336\right) \text {, }
$$

a total of 336 groups;
When $6 a+11 b=2019$, we have
$$
a=11 t_{2}-10, b=189-6 t_{2}\left(1 \leqslant t_{2} \leqslant 31\right) \text {, }
$$

a total of 31 groups;
When $22 a+39 b=2019$, we have
$$
a=39 t_{3}+12, b=45-22 t_{3}\left(0 \leqslant t_{3} \leqslant 2\right) \text {, }
$$

a total of 3 groups.
After analysis and calculation, there are no solutions when the coefficients are too large.
In summary, there are 370 groups of solutions that satisfy the conditions.