I am developing a WSGI based web framework with sqlalchemy.  I am
unclear about when create_engine() should be called.  I initially
thought that engine creation and metadata would be initialized per
process and each thread/request would just get a new session.
However, I have recently run into error messages when using sqlite
with the framework in a threaded WSGI server:

"SQLite objects created in a thread can only be used in that same
thread..."

That lead me to this thread:

http://groups.google.com/group/pylons-discuss/browse_thread/thread/3d3009cd7421c45a/ed0f3dde401ff474?lnk=gst

Can someone weigh in on this issue?  What are the performance
ramifications of needing to create an engine on each request as
opposed to each process?  Do I also need to load my meta data on each
request or could I just re-bind the engine to the metadata on each
request?  Should I not bind the engine to the metadata at all but just
bind it to the session?

Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to