[OT] Re: IPC::Shareable

2001-10-16 Thread Stephen Adkins

Hi,

The shared memory segment was already created by another user,
and it was created without permissions for you to write to it.

Try the ipcs command to view existing shared memory segments.
Try the ipcrm command to remove an old one.

Stephen

At 03:02 PM 10/16/2001 -0700, Rasoul Hajikhani wrote:
Pardon the off topic thread,
I am trying to make IPC::Shareable work with my script, however I get
this error:
IPC::Shareable::SharedMem: shmget: Permission denied
 at /usr/local/lib/perl5/site_perl/5.005/IPC/Shareable.pm line 456
[Tue Oct 16 14:44:15 2001] [error] Could not create shared memory
segment: Permission denied
Does any one know what's up?





Re: IPC::Shareable

2001-10-16 Thread Luciano Miguel Ferreira Rocha


Make sure that you're not creating a too big shared memory segment and
that you're (apache) running with an uid that is allowed to create
shared memory segments.

From the apache configuration file:
#  . On HPUX you may not be able to use shared memory as nobody, and the
#suggested workaround is to create a user www and use that user.
#  NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
#  when the value of (unsigned)Group is above 6; 

hugs
  Luciano Rocha

-- 
Luciano Rocha, [EMAIL PROTECTED]

The trouble with computers is that they do what you tell them, not what
you want.
-- D. Cohen



Re: IPC::Shareable

2001-10-16 Thread Perrin Harkins

 I am trying to make IPC::Shareable work with my script, however I get
 this error:
 IPC::Shareable::SharedMem: shmget: Permission denied
  at /usr/local/lib/perl5/site_perl/5.005/IPC/Shareable.pm line 456
 [Tue Oct 16 14:44:15 2001] [error] Could not create shared memory
 segment: Permission denied
 Does any one know what's up?

In the time it takes you to debug it, you could switch your code to
MLDBM::Sync and forget about all these annoying shared memory issues.  It
would probably be faster too.
- Perrin




Re: IPC::Shareable

2001-10-16 Thread Rasoul Hajikhani

Perrin Harkins wrote:
 
  I am trying to make IPC::Shareable work with my script, however I get
  this error:
  IPC::Shareable::SharedMem: shmget: Permission denied
   at /usr/local/lib/perl5/site_perl/5.005/IPC/Shareable.pm line 456
  [Tue Oct 16 14:44:15 2001] [error] Could not create shared memory
  segment: Permission denied
  Does any one know what's up?
 
 In the time it takes you to debug it, you could switch your code to
 MLDBM::Sync and forget about all these annoying shared memory issues.  It
 would probably be faster too.
 - Perrin

Cool, it is really fast... and very easy to implement... Curious though,
is there a delete method/operation any where? Could not find anything in
the perldoc docs indicating a method like that! Any ideas??
Thanks in advance.
-r



Re: IPC::Shareable

2001-10-16 Thread Perrin Harkins

 is there a delete method/operation any where? Could not find anything
in
 the perldoc docs indicating a method like that!

It supports the same interface as normal hashes, so you can delete keys
in the same way.  You may also want to read the MLDBM documentation if
you haven't already.
- Perrin




Re: IPC::Shareable, or, it's supposed to SHARE it, not make more!

2001-09-01 Thread Joe Schaefer

Rob Bloodgood [EMAIL PROTECTED] writes:

 The code in expire_old_accounts is creating a new tied ARRAYREF instead of
 replacing the value of the hash key on this line:
 
 $ACCOUNTS{'QUEUE'} = [@accounts]; #also tried \@accounts;
 
 This didn't happen w/ IPC::Shareable 0.52.  But 0.6 is apparently very
 different, and I can't make the code look like it wants, so the new
 reference is a replacement, not an autovivication.
 

Sorry, but I think you're SOL with IPC::Shareable.  Use something else
instead- I like BerkeleyDB for things like this, but you'll have to 
serialize/stringify your hash values first.

-- 
Joe Schaefer




Re: IPC::Shareable, or, it's supposed to SHARE it, not make more!

2001-08-31 Thread Perrin Harkins

 One of the shiny golden nuggets I received from said slice was a shared
 memory cache.  It was simple, it was elegant, it was perfect.  It was also
 based on IPC::Shareable.  GREAT idea.  BAD juju.

Just use Cache::Cache.  It's faster and easier.
- Perrin




Re: IPC::Shareable (was Re: Perl module - LWP)

2000-10-23 Thread Alexander Farber (EED)

On Sun, 22 Oct 2000, Steven Cotton wrote:
 What version of Perl are you using? I had some problems with make test,
 one of the tests doesn't return and I got a few munged shared memory
 segment errors, I was attempting to install under Solaris 7 and Perl
 5.6.0.

The messages about "munged shared memory" seem to be going if you change

my($tag, $ice) = unpack 'A14 A*' = $stuff;

in the file lib/IPC/Shareable.pm, sub _thaw to the:

my($tag, $ice) = unpack 'A13 A*' = $stuff;

(since the sub _freeze calls

my $stuff = 'IPC::Shareable' . $ice;   

- i.e. 13 chars). But there are further problems ("make test" hangs)...



Re: IPC::Shareable (was Re: Perl module - LWP)

2000-10-23 Thread Alexander Farber (EED)

my $stuff = 'IPC::Shareable' . $ice;   
 - i.e. 13 chars)

Oops, sorry - I can't count on mondays!



Re: IPC::Shareable (was Re: Perl module - LWP)

2000-10-22 Thread Steven Cotton

On Sat, 21 Oct 2000, Alexander Farber (EED) wrote:

 Is anybody successfully using it under Solaris or OpenBSD?
 "make test" hangs for me on these platforms and the module
 author is unreachable :-(

What version of Perl are you using? I had some problems with make test,
one of the tests doesn't return and I got a few munged shared memory
segment errors, I was attempting to install under Solaris 7 and Perl
5.6.0.

 If not IPC::Shareable, what module do you use for fast
 communication between Apache-children?

I started with IPC::SharedCache since it did most of what I wanted, but
took Sam Tregars advice and went with IPC::ShareLite (and serialised all
data myself with Storables freeze  thaw methods) and it works a dream.
One thing I couldn't seem to do was delete() tied IPC::Shareable hash
elements without getting the aforementioned "munged shared memory segment"
errors, which I can do with IPC::ShareLite.

-- 
steven




Re: IPC::Shareable (was Re: Perl module - LWP)

2000-10-21 Thread Greg Cope

"Alexander Farber (EED)" wrote:
 
 "David M. Davisson" wrote:
  Yes, it works fine.  No mods.
 
  From: "David Jourard" [EMAIL PROTECTED]
   Has anyone worked with the LWP module under mod_perl and have they found
   that it works with no modification.
 
 I would like to ask the same question about IPC::Shareable.
 
 Is anybody successfully using it under Solaris or OpenBSD?
 "make test" hangs for me on these platforms and the module
 author is unreachable :-(
 
 http://vorpal.mcs.drexel.edu/bsd-ports/helix/shared-memory.html
 doesn't seem to help on OpenBSD (increasing SHMMAXPGS up to 4096)
 
 If not IPC::Shareable, what module do you use for fast
 communication between Apache-children?

IPC::ShareLite is writen in C (and hence faster (arguably)), but it does
not serial data structures, so either Freeze / Thaw or DataDumper are
you friends here.

I've seen IPC::Sharable working ok on Solaris 2.6 but cannot offer any
guideance as to why it may not work.

Greg



Re: IPC::Shareable problems

2000-09-06 Thread Nouguier

Steven Cotton wrote:

 Hi,

 I've been having some problems delete()'ing elements from a tied
 IPC::Shareable hash. The example from the pod works fine (but that's not
 running under mod_perl) so I'm wondering if there are any lifetime/scope
 issues with using IPC::Shareable 0.51 under mod_perl 1.24. Has anyone had
 any "Munged shared memory segment (size exceeded?)" errors when trying to
 access (I'm using `exists()') a previously deleted hash element? I see no
 examples in the Eagle of deleting tied and shared hash elements (only
 under Apache::Registry), and Deja and various newsgroups and web searches
 haven't turned up anything. I'm running Apache 1.3.12 and Perl 5.6.0.

 Thanks,

 --
 Steven Cotton
 [EMAIL PROTECTED]

hi,
 you should try with IPC::ShareLite which provide the same things but seems
better maintained...