Roger,

Can you add a print statement to the place in your SitePage module where
you create the object store?  It sounds to me like the module is getting
reloaded for some reason.  You can tell for sure by adding the print
statement.

- Geoff


On Wed, 2002-07-10 at 17:22, Roger wrote:
> I am not doing any reloads, I got better at just stopping and restarting the 
> AppServer quickly.
> 
> I think the problem is in the MySQL interface, and I don't understand some 
> basic concept.  In particular, the MiddleKit ToDo docs say:
>       [ ] Threads: MK objects are not thread safe.
> 
> My SitePage module contains:
>       sqldb = MySQLObjectStore(user=dbUser, passwd=dbPassword) 
>       sqldb.readModelFileNamed(webwareModelDirectory) 
> 
> Any servlet that needs access to the MySQL store just sets up a local pointer:
>       sqldb = SitePage.sqldb
> ...and uses it for all accesses to MySQL.  Am I supposed to be using locks in 
> front of all MySQL access?
> 
> I just added the "'SQLConnectionPoolSize': 20," that George mentioned in the 
> MiddleKit Connection Handling discussion to my Settings.config file.  Is the 
> number 20 intended to be higher than the number of threads (10) started by 
> AppServer?
> 
> Roger Haase
> 
> 
> On Wednesday 10 July 2002 11:22 am, Chris Prinos wrote:
> > cab
> > Roger,
> >
> > see my message to a similar question in the webware-discuss archive...
> > http://www.geocrawler.com/archives/3/3854/2002/6/100/8905347/
> >
> > I haven't had any more problems with these kinds of TypeErrors since
> > removing reload() from production versions of my application's code (I
> > still use it debug in the OneShot adaptor, or even with the multithreaded
> > one if the server is just handling one request at a time during
> > development). Even if reload() is not being used on the code that calls
> > ShowPix, you could run into it if you were manually reloading through the
> > admin console as well
> >
> > Chris
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED]]On Behalf Of Roger
> > > Sent: Wednesday, July 10, 2002 1:55 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [Webware-discuss] MiddleKit/MySQL Threading Problem? (long
> > > description)
> > >
> > >
> > > I am developing an application that does a lot of image
> > > manipulation.  Many
> > > of my web pages may have 10 to 75 entries similar to:
> > >   <img src="ShowPix.py?pid=23&tn=256">
> > >
> > > The ShowPix.py program does 4 calls to MySQL (thru
> > > MiddleKit), reads the
> > > image from the filesystem, manipulates the image (reduces it
> > > in size, draws
> > > on it) and outputs the image.
> > >
> > > I was rarely getting an error "TypeError: unbound methox
> > > processFields() must
> > > be called with ShowPix instance as first argument (got
> > > ShowPix instance
> > > instead)".  This would happen on my first function call
> > > within ShowPix on the
> > > line:
> > >   processFields(self,req)
> > >
> > > I was having this problem once a week or month, almost always
> > > on my first
> > > image display on a freshly started AppServer.  I recently
> > > swapped some PC
> > > hardware and and am now developing on a PC with a faster CPU
> > > and a slower
> > > hard drive.  I now get these errors frequently, sometimes 30
> > > of 75 image
> > > displays on a single page will fail (worst case).  Sometimes
> > > the point of
> > > failure will change as well, and the failure comes on a
> > > function call deep
> > > within ShowPix.
> > >
> > > This problem occurs on both Mandrake Linux 8.2 and
> > > Windows/ME.  On my new
> > > development PC I have downloaded the current version of
> > > everything within the
> > > past 2 weeks (Apache is version 1.3.26 as the 2.x version
> > > doesn't work on
> > > W/ME yet).
> > >
> > > I have rewritten the ShowPix module to eliminate the MySQL
> > > access and am
> > > slowly migrating to the new module.  I am not sure this fixes
> > > the problem, as
> > > I don't fully understand the problem.  Any advice will be appreciated.
> > >
> > > Roger Haase
> > >
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This sf.net email is sponsored by:ThinkGeek
> > > Two, two, TWO treats in one.
> > > http://thinkgeek.com/sf
> > > _______________________________________________
> > > Webware-discuss mailing list
> > > [EMAIL PROTECTED]
> > > https://lists.sourceforge.net/lists/listinfo/webware-discuss
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Two, two, TWO treats in one.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > Webware-discuss mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/webware-discuss
> > 0
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Two, two, TWO treats in one.
> http://thinkgeek.com/sf
> _______________________________________________
> Webware-discuss mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/webware-discuss




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Two, two, TWO treats in one.
http://thinkgeek.com/sf
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to