Is there any difference between using the public IP vs using the private IP of a droplet (connection stability wise)?

Hi DO community, I ask this question because I have a DockerContainer(Java) -> Droplet(MariaDB) app and sometimes (is not frequent and I haven’t discovered any pattern) receive the warning

WARN com.zaxxer.hikari.pool.PoolBase - HikariPool-1 - Failed to validate connection com.mysql.cj.jdbc.ConnectionImpl@d1e1999 (No operations allowed after connection closed.). Possibly consider using a shorter maxLifetime value

And I checked all my code and I’m not executing any query after the close statement (I’m using a Closeable wrapper for the hibernate entity manager).

Thanks in advance

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


The private network would be used to communicate between your droplets in the datacenter. If the applications that you are connecting to are within the same region switching to the private IP address should provided a more secure, faster, low latency connection. The private IP will only work within a single region so if you need to go outside of this boundary you will need to use the public interface.

A Virtual Private Cloud (VPC) is a private network interface for collections of DigitalOcean resources. VPC networks provide a more secure connection between resources because the network is inaccessible from the public internet and other VPC networks. Traffic within a VPC network doesn’t count against bandwidth usage.

You can know more about VPC in below link:

Hope that this helps. Regards, Priyanka