Raul Dias wrote:
Hi,

I just switch my apache to use the worker MM.

I have a filter which uses Cache::SharedMemoryCache to share data
between process (and hopefully threads now).

A simple example is this:
---
use Cache::SharedMemoryCache;
$cache = new Cache::SharedMemoryCache(
        {
                namespace => 'my namespace',
        } );
-----

This will result the error:
[Mon Dec 29 17:48:31 2003] [error] [client xxx.xxx.xxx.xxx] Object #260
should have been retrieved already at ../../lib/Stora
ble.pm (autosplit into ../../lib/auto/Storable/thaw.al) line 358, at
/usr/lib/perl5/site_perl/5.8.0/Cache/CacheUtils.pm line
121

After this I switched back to a apache pre-fork MM and the problem
continued.

As Cache::SharedMemoryCache is process independent, even a small script
generate this error.

Later, I switched one more time to apache MM worker and restarted the
server machine.

Everything worked fine.

Does anyone have a clue why this happened?

Is it possible that it's an issue Jan has mentioned yesterday:
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2003-12/msg00994.html
since it uses PL_modglobal which is not properly CLONEd on perl_clone (used under threaded mpms). What happens if you patch Storable.xs the way Jan explained and rebuild/install it?


Perrin Harkins wrote:
> You could also try to just share variables between the threads, which is
> the only way to share without using Storable.  The trouble is, objects are
> not easy to share in this way, and any performance you gain may be
> cancelled out by the generally poor performance of Perl threads.

s/generally poor performance of Perl threads/poor performance of starting new Perl threads/, otherwise the runtime performance is not any different from normal Perl.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html



Reply via email to