The best rational approximations will be the convergents of the continued fraction for $\pi.$ We have:
$$\pi = [a_0; a_1,a_2,\ldots]=[3, 7, 15, 1, 292, 1, 1, 1, 2, 1, 3, 1, 14, 2, 1, 1, 2, 2, 2, 2, 1, 84, 5,\ldots]$$
Then it's easy to compute the convergents by iteration until you hit a denominator bigger than $10^{15}$. The first two convergents are $3$ and $22/7$. If the numerators of the convergents are $p_0, p_1, \ldots$ and the denominators are $q_0, q_1, \ldots,$ then the recursion formula is:
$$\frac{p_n}{q_n} = \frac{a_n p_{n-1} + p_{n-2}}{a_n q_{n-1}+q_{n-2}}.$$
So we compute convergents until the denominator is too big:
$$3, \frac{22}{7}, \frac{333}{106}, \frac{355}{113}, \frac{103993}{33102}, \ldots \frac{428224593349304}{136308121570117}, \frac{5706674932067741}{1816491048114374}.$$
So the second last fraction above is the 28th convergent and is the last one smaller than $10^{15}.$