3

I was experimenting with SQLAlchemy on Xeround:

>>> from sqlalchemy import create_engine
>>> engine = create_engine("mysql://user:pass@instance0000.db.xeround.com.:1234/app000000")
>>> engine.execute("SELECT USER()").scalar()
>>> exit()

I did that a couple of times. Then I checked my Xeround management dashboard and it shows 2 connections. That was before I learned about:

>>> engine = create_engine("mysql://user:pass@instance0000.db.xeround.com.:1234/app000000")
>>> conn = engine.connect() # dashboard shows 3 connections
>>> conn.close() # dashboard still shows 3 connections
>>> exit() # after exiting, dashboard shows 2 connections

How do I force Xeround to close the remaining 2 connections (e.g. to forgive me for forgetting to close them)?

tshepang
  • 12,111
  • 21
  • 91
  • 136
Kit
  • 30,365
  • 39
  • 105
  • 149

1 Answers1

0

How do I force Xeround to close the remaining 2 connections (e.g. to forgive me for forgetting to close them)?

If you restart mysql service all works again like a charm, because your connections are not closed properly. In this case, you need to use A Connection Pool

julionc
  • 349
  • 1
  • 4