Andrea said:
> on both installations i'm using DbConnectionPool module,
> by Written by Warren A. Smith to allows to use a pool of mysql
> connection in a more reliable way then standard webware dbpool
> (it resumes a "closed" connection, useful when you have
> a nasty firewal between webware and mysql).
>
> i always return the connection to the pool since i've this
> code on my SitePage class:
>
>    def awake(self, transaction):
>      Page.awake(self, transaction)
>
>      # acquire DB connection from pool
>      self._cnn = cm.connection
>
>    def sleep(self, transaction):
>      Page.sleep(self, transaction)
>
>      # release DB connection to pool
>      self._cnn.close()
>
> i'm really puzzled since the lock-up seems act randomly both
> in time and in the place (different servlets). next step is to
>   replace DbConnectionPool  with webware with DbPool, since there isn't
> any firewall between linux server and mysql (they are on the same
> server).
>
> any idea will be greatly appreciated.
>

I haven't done any Webware development for quite some time and I never
fully tested DbConnectionPool.  However, this past weekend I was working
on a Webware/Cheetah/PostgresSQL project and had some similar problems to
yours on my development server, where Apache, Webware, and PostgresSQL are
all running on the same machine (no firewall anywhere).  Suspecting the
database connection as the culprit, I tried adjusting the maxIdle and
maxAge parameters of DbConnectionPool.startExpiration() to lower values
than the defaults.  So far, my problems have vanished.  Perhaps I was
running into a default timeout on the PostgresSQL connection itself?

Just curious.  Have you had any problems with DbConnectionPool?  I knew a
few people gave it a try back when I wrote it, but this is the first time
that I have heard of someone still using it.  Feedback, both positive and
negative are still appreciated.

I have some ideas to increase the efficiency of the expiration logic and I
have also considered adding a maxUsage parameter that limits the number of
times a connection can be acquired.  I also need to write a better test
suite using Python's unittest framework.  The existing test code, while
exercising the module pretty well, does not really accomplish the task of
testing it.

Now that I am working on a project myself that make use of
DbConnectionPool, perhaps I can work in some of these changes.

-- 
Warren Smith
[EMAIL PROTECTED]


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to