Amazon Neptune
User Guide (API Version 2017-11-29)

Explicitly Closing Gremlin Java Driver Connections to Avoid Connection Limit

If you do not explicitly close your connections to Amazon Neptune, the connections might be kept alive, causing you to reach the limit of 60,000 WebSockets connections. Additional connections are then refused, and HTTP 429 is returned.

Cluster.close() closes all the Client instances created from the cluster and all the connection created by the Client instances.

If you reach the connection limit, you must restart the Neptune instance to close the existing connections.