You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Andre Landwehr <an...@gmx.net> on 2002/08/06 17:56:18 UTC

Re: embperl 2 session management

On Tue, Aug 06, 2002 at 11:16:47AM +0200, Gerald Richter - ecos gmbh wrote:
> You need to install Apache::SessionX or set Embperl_Session_Handler_CLass
> Embperl::Session
> 
> see README.v2

Ok, I admit it, reading is difficult ;-) 
I have Apache::SessionX installed and
Embperl_Session_Config "File Semaphore"
as the only session configuration option now. File Semaphore is
also the only thing configured for Apache::SessionX. But a request to my
testpage hangs, and the embperl.log says the following, which
to me looks as if everything was ok with the request. Any idea
about that? Thanks a lot...

_ep_rp(9,scalar($mdat{pagecounter}++ ));
# Include here any cleanup code
                                $DB::single = 0 ;
                                
 _ep_cp(2) ;

[1439]PERF: Compile Start Time:     50 ms 
[1439]PERF: Compile End Time:       50 ms 
[1439]PERF: After Compile Exec End Time: 50 ms 
[1439]PERF: Perl Compile End Time:          50 ms 
[1439]PERF: Compile Time:                   0 ms 
[1439]PERF: DOMSTAT: MemUsage = 68176 Bytes  numNodes = 11
numLevelLookup = 0  numLevelLookupItem = 0  numStr = 79
numReplace = 0  
[1439]EVAL< <unknown>


Andre

--
"The inside of a computer is as dumb as hell, but it goes like mad!"
(Physicist Richard Feynman)


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: embperl 2 session management

Posted by Andre Landwehr <an...@gmx.net>.
On Thu, Aug 22, 2002 at 11:53:32AM +0200, Gerald Richter - ecos gmbh wrote:
> Apache::Session uses a hash function to select a semaphore out of a array.
> It may cause the the deadlock if both %udat and %mdat use the same one. If I
> have it right in mind per default we have 32 semaphores, to which all ids
> are mapped.
> 
> I will checkout this more in detail, but have to do some other stuff first

No problem since I barely use %mdat at all. It was just a test if
my setup is correct.

Andre

--
"The inside of a computer is as dumb as hell, but it goes like mad!"
(Physicist Richard Feynman)


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: embperl 2 session management

Posted by Gerald Richter - ecos gmbh <ri...@ecos.de>.
>> [+ $mdat{cnt}++ +]
>>
>> Does it work or do you get the same problems?
>Ah, ok, that works. But the problem returns as soon as I have
>both udat and mdat in the page. Maybe it is Apache::Session or
>Apache::SessionX getting confused about having two session id's for
>one page and only one semaphore for it or something like that?

Apache::Session uses a hash function to select a semaphore out of a array.
It may cause the the deadlock if both %udat and %mdat use the same one. If I
have it right in mind per default we have 32 semaphores, to which all ids
are mapped.

I will checkout this more in detail, but have to do some other stuff first

Gerald






---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: embperl 2 session management

Posted by Andre Landwehr <an...@gmx.net>.
On Thu, Aug 22, 2002 at 06:52:45AM +0200, Gerald Richter wrote:
> Strange, %udat and %mdat are handled excatly the same, they just get a
> different session id.
> 
> If you make a very simple page which just contains
> 
> [+ $mdat{cnt}++ +]
> 
> Does it work or do you get the same problems?

Ah, ok, that works. But the problem returns as soon as I have
both udat and mdat in the page. Maybe it is Apache::Session or
Apache::SessionX getting confused about having two session id's for
one page and only one semaphore for it or something like that?

Andre

--
"The inside of a computer is as dumb as hell, but it goes like mad!"
(Physicist Richard Feynman)


Re: embperl 2 session management

Posted by Gerald Richter <ri...@ecos.de>.
>>
>> Seems like a problem with semaphores inside of Apache::Session. You may
try
>> to remove the semaphore with ipcrm so it gets recreated (you can view it
>> with ipcs).
>
>Well, exactly that seems to be the case. As soon as I kill the
>semaphore with ipcrm the page is displayed correctly, even the
>test counter $mdat{count} is incremented. The weird
>thing is that the problem only exists when I use %mdat, no
>problems at all with %udat (thankfully, for that is the one I use
>most ;-))
>

Strange, %udat and %mdat are handled excatly the same, they just get a
different session id.

If you make a very simple page which just contains

[+ $mdat{cnt}++ +]

Does it work or do you get the same problems?

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------




---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: embperl 2 session management

Posted by Andre Landwehr <an...@gmx.net>.
On Tue, Aug 06, 2002 at 06:36:02PM +0200, Gerald Richter wrote:
> > I have Apache::SessionX installed and
> > Embperl_Session_Config "File Semaphore"
> 
> You don't need this when you have made it the default during
> Apache::SessionX Makefile.PL run
> 
> > as the only session configuration option now. File Semaphore is
> > also the only thing configured for Apache::SessionX. But a request to my
> > testpage hangs, and the embperl.log says the following, which
> > to me looks as if everything was ok with the request.
> 
> It Compiles the page, but hangs during run.
> 
> Seems like a problem with semaphores inside of Apache::Session. You may try
> to remove the semaphore with ipcrm so it gets recreated (you can view it
> with ipcs).

Well, exactly that seems to be the case. As soon as I kill the
semaphore with ipcrm the page is displayed correctly, even the
test counter $mdat{count} is incremented. The weird
thing is that the problem only exists when I use %mdat, no
problems at all with %udat (thankfully, for that is the one I use
most ;-)) 

Is the problem reproducable (File Semaphore locking was used) for
anybody? Does it happen with other storage mechanisms as well?

Andre

--
"The inside of a computer is as dumb as hell, but it goes like mad!"
(Physicist Richard Feynman)


Re: embperl 2 session management

Posted by Gerald Richter <ri...@ecos.de>.
> I have Apache::SessionX installed and
> Embperl_Session_Config "File Semaphore"

You don't need this when you have made it the default during
Apache::SessionX Makefile.PL run

> as the only session configuration option now. File Semaphore is
> also the only thing configured for Apache::SessionX. But a request to my
> testpage hangs, and the embperl.log says the following, which
> to me looks as if everything was ok with the request.

It Compiles the page, but hangs during run.

Seems like a problem with semaphores inside of Apache::Session. You may try
to remove the semaphore with ipcrm so it gets recreated (you can view it
with ipcs).

Gerald

P.S. I am out of office for the next days, so I won't read any email before
monday :-)



-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------




---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org