Re: Pool Module Question
"Ben Ringold" <ben-3GbDDtM/[email protected]>
| Newsgroups | gmane.comp.python.spyce.general |
|---|---|
| Message-ID | <[email protected]> |
Alright, so I've upgraded to Spyce 2.0.3, and cached objects are now being stored correctly in a single pool. Now I'm trying to use the pool to maintain several shared MySQL connections. The connection objects are saved and can be recovered from the pool. However, when I fish them out of the pool, the connections are always closed. This is happening both in mod_python and in fcgi. Has anybody successfully implemented a Mysql 3 connection cache using the Spyce Pool module? There are a lot of moving parts here, so I'm not really sure when/why those connections are closing themselves. Thanks. Ben Ringold Hypothetical Software ---------- Original Message ---------------------------------- From: "Ben Ringold" <ben-3GbDDtM/[email protected]> Reply-To: <ben-3GbDDtM/[email protected]> Date: Sat, 15 Apr 2006 11:22:13 -0600 >Ah, please disregard, that last error. Adding my application lib location to the spyce configuration files cleared it up (should have been obvious I suppose). I do seem to be running into a few other backwards compatability issues. Is there an application migration doc for spyce upgrades anywhere? Maybe I should start one. > >Ben Ringold >Hypothetical Software > > >---------- Original Message ---------------------------------- >From: "Ben Ringold" <ben-3GbDDtM/[email protected]> >Reply-To: <ben-3GbDDtM/[email protected]> >Date: Sat, 15 Apr 2006 11:12:39 -0600 > >>For the time being, I'll try to stick with mod_python and upgrade to 2.x I may have to revisit the proxy server option if this doesn't work. >> >>I've upgraded to 2.0.3 and it worked until something was saved in the pool. Now, anytime I use the [[.import names="pool"]] directive, I get the following error: >> >>-- BEGIN PASTE -- >>Unexpected exception: (please report!) >>Traceback (most recent call last): >> File "/usr/share/spyce/spyce.py", line 288, in commonHandler >> thespyce.spyceInit(request, response) >> File "/usr/share/spyce/spyce.py", line 588, in spyceInit >> self._startModule(modname, modfrom, modas, 1) >> File "/usr/share/spyce/spyce.py", line 573, in _startModule >> mod.start() >> File "/usr/share/spyce/modules/pool.py", line 44, in start >> self._pool = pickle.load(f) >>ImportError: No module named detectives >>-- END PASTE -- >> >>Notes: >>1) The missing "detectives" module refers to the class of the object saved in the pool. >>2) This is happening immediately on the import directive, I do not have to try to access the pool value to get the error. >> >>This looks more like a configuration error to me, rather than a backwards compatability issue, however I get a similar error wether using mod_python or fcgi. >> >>Thanks again. >> >>Ben Ringold >>Hypothetical Software >> >> >>---------- Original Message ---------------------------------- >>From: "Jonathan Ellis" <[email protected]> >>Date: Sat, 15 Apr 2006 09:51:29 -0700 >> >>>On Sat, 15 Apr 2006 08:16:29 -0600, "Conan C. Albrecht" >>><conan-RXmsyT/Szrj2fBVCVOL8/[email protected]> said: >>>> The "multiple instances of spyce, hence multiple instances of the >>>> pool" problem is related to mod_python, not spyce. Mod_python runs >>>> multiple instances of itself in an effort to increase load. The side >>>> effect to this is you get multiple pools. >>> >>>With the 2.x versions, Spyce will pickle objects to disk (with locking) >>>under mod_python to avoid multiple pools. So you still get correct >>>behavior; it's just slow. :) >>> >>>The advice to use a proxy server setup when using Pool is still good. >>> >>>-Jonathan >>>-- >>>C++ is history repeated as tragedy. Java is history repeated as farce. --Scott McKay >>> >>> >> >> >> >> >> >>________________________________________________________________ >>Sent via the WebMail system at hypotheticalsoftware.com >> >> >> >> >> > > > > > >________________________________________________________________ >Sent via the WebMail system at hypotheticalsoftware.com > > > > > > >------------------------------------------------------- >This SF.Net email is sponsored by xPML, a groundbreaking scripting language >that extends applications into web and mobile media. Attend the live webcast >and join the prime developer group breaking into this new coding territory! >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 >_______________________________________________ >Spyce-users mailing list >[email protected] >https://lists.sourceforge.net/lists/listinfo/spyce-users > ________________________________________________________________ Sent via the WebMail system at hypotheticalsoftware.com ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642