I a create a session with these following lines;
 

Base = declarative_base()

 engine = create_engine(
'mysql://sentio_reader:therea...@sentiodb.cloudapp.net/sentio') 

 #engine = 
create_engine('mysql://erogol:ern88GOL!@sentioerogol.cloudapp.net/sentio_data') 


# engine.echo = True 
 metadata = MetaData(bind=engine) 

 metadata.reflect(bind=engine) 

 create_all_tables() 

 session = create_session(bind=engine)

create_all_tables simply creates table objects based on the metadata for 
all the DB tables.

After I run this code, if I wait some times, functions like session.query() 
start to be unresponsive, I guess owing to some kind of time out. Is there 
any way to keep DB connection always alive in SQLAlchemy?

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to