On Thu, Nov 09, 2000 at 06:17:54PM -0500, Joe Lauer wrote:
> 1.) The most common is that it appears like the session dies or disappears
> because I'll get thrown back to the login page and that only occurs when the
> session doesn't exist. I'll login once again and either the session won't
> be created or it will last for even less then the first time.
>
> 2.) The other problem which really freaks me out is that if two developers
> are working on the same machine -- sometimes I will hit some page on the
> site and see HIS content. I will then be able to access all of his
> information, pages, etc.. until that session dies out like in number 1.
ok. these sound like locking problems (particularly the first one).
> This is in my conf file for apache.
>
> I'm using Apache with mod_perl built static. I am loading Embperl at
> startup. Here are my versions.
> OS is FreeBSD 4.0 Release
> Perl Version: 5.005_03
> Embperl version 1.2.1
> Apache::Session 1.03
> Apache 1.3.12
> mod_perl 1.24
> PerlSetEnv EMBPERL_SESSION_CLASSES "DBIStore SysVSemaphoreLocker"
> PerlSetEnv EMBPERL_SESSION_ARGS "DataSource=dbi:mysql:sessions UserName=username
>Password=password"
> Installing Apache::Session 1.51 to no avail even though that is the version
> I use on the production. Gerald explained in earlier emails that 1.51 won't
> work with 1.2.1, but I've used it successfully before. Nonetheless, I'm
> using 1.03 right now.
weird. from what i understand, 1.5 shouldn't have worked at all with
embperl 1.2..
> I've tried all the different lockers. Part of my problem is that I don't
> understand the difference between locker types
the lockers in Apache::Session 1.0:
NullLocker no locking. need the store to do its own locking (like
postgres or oracle using commits). or only have one
apache process, so no locking is necessary (win32)
SysVSemaphoreLocker
uses sysv semaphores. these are are a shared memory
thing, so will only work if all the apache processes
are on the one host. fast, since there's no file
access.
PosixFileLocker
uses posix lockf(3) on a file. slower than
memory-based locking, but might work over multiple
hosts, if lock files are on NFS and the NFS server and
client both support locking (freebsd doesn't iirc)
DaemonLocker a server/client program that will handle locking over
a network. see docs/source for more - i've never used
it.
NullLocker certainly wouldn't work with mysql. SysVSemaphoreLocker
should tho (is there anything special you have to do on freebsd to
enable sysv shared memory / semaphores ?)
the sysv stuff is persistant after the processes using it has exited,
unless it is cleaned up correctly. ipcs(8), ipcrm(8) will let you see
them and remove them if this is the case. from the SysVSemaphore.pm
source, it appears that it always uses a key of (decimal) 31818.
i'd expect some sort of apache.log message if there was a problem
initialising or using sysv semaphores.
if you only have one webserver, PosixFileLocker is probably the most
straightforward. it needs a LockDir which the apache user can write
to (defaults to /tmp). try this and see "if pain persists".
--
- Gus
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]