4. Given that two large spherical surfaces with a radius of 1 are externally tangent to each other and both are internally tangent to a cylindrical surface with a radius of 1, and a smaller spherical surface is externally tangent to both large spherical surfaces and internally tangent to the cylindrical surface. A plane passing through the center of the small sphere and the center of one of the large spheres intersects the cylindrical surface to form an ellipse. Then the maximum possible value of the eccentricity of this ellipse is
4. $\frac{4}{5}$.

It is easy to calculate that the radius of the small sphere is $\frac{1}{4}$. Let the line passing through the center of the small sphere and the center of a large sphere intersect the cylinder at points $C$ and $D$. Then, the ellipse formed by the section through $C$ and $D$ has a constant minor axis length (the diameter of the cylinder's base is 2), and the minimum value of the major axis length is $CD$. It is easy to know that $CD=\frac{10}{3}$, so the eccentricity of the ellipse $e=\sqrt{1-\left(\frac{b}{a}\right)^{2}} \leqslant \sqrt{1-\left(\frac{3}{5}\right)^{2}}=\frac{4}{5}$.