Michael Mileusnich wrote:
> It seems the problem is something else.  A while back I ran into issues
> where on Windows and MS SQL, my data was not not being inserted into my
> tables.  For some reason, by adding metadata.createall() right before I
> return my Session in my getsession() function, data started inserting
> again.  This worked for both Windows, Mac, and Linux.  Now switching my
> app
> to use the multiprocessor threadin library, that metadata.createall()
> throws
> all kinds of errors on Mac/Linux, if I remove it everything runs great
> except on Windows where data does not insert again.  Any ideas where I
> should start looking?

start logging SQL to examine the database conversation taking place.  I'd
recommend configuring Python logging manually and ensuring that the
process ID is part of the log lines displayed so that you can see the
interaction of multiple processes.

create_all() doesn't have any effect on the status of a connection under
normal usage.


>
> On Thu, Sep 10, 2009 at 11:10 AM, Michael Bayer
> <[email protected]>wrote:
>
>>
>> Michael Mileusnich wrote:
>> > I have a db file with a function called getsession() that returns my
>> > Session
>> > which has been established to = a scoped session.  The odd thing is it
>> > works
>> > fine on my Windows XP machine, however on my ubuntu box it throws
>> errors.
>> > I
>> > guess I'll reply later today with the errors.
>> > Thanks
>> > Michael Mileusnich
>>
>> keep in mind that DBAPI connections are usually not going to persist
>> across a fork() on a unix system, so that each time you start a new
>> child
>> process, you have to create a new engine and ensure that the engine of
>> the
>> parent process is no longer accessed.
>>
>>
>>
>>
>>
>>
>> >
>> > On Thu, Sep 10, 2009 at 10:10 AM, Michael Bayer
>> > <[email protected]>wrote:
>> >
>> >>
>> >> Michael Mileusnich wrote:
>> >> > I have switched my application to use the Python multiprocessor
>> >> threading
>> >> > instead if the default python gil threading.  I seem to be running
>> >> into
>> >> > issues.  I am using scoped sessions and in my run() function, when
>> I
>> >> try
>> >> > to
>> >> > do sess = getsession() to grab the session sql alchemy throws a
>> large
>> >> > number
>> >> > of errors.  Is this supported?
>> >>
>> >> I'm assuming you're referring to the "multiprocessing" module in
>> Python
>> >> 2.6.  It is absolutely supported, I run several applications in a
>> >> production environment with heavy usage of multiprocessing.
>> >>
>> >>
>> >> >
>> >>
>> >
>> > >
>> >
>>
>>
>> >
>>
>
> >
>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
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