[prev] [thread] [next] [Date index for 2004/12/08]
------_=_NextPart_001_01C4DD81.EC5D1760 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable =20 Dear mod_perl list, =20 Normally I would not bother the mod_perl list with=20 questions but I have a problem with Apache::DBI, Apache::SessionManager and Apache::Sessions regarding hanging oracle sessions. =20 I have noticed within the=20 Apache::Session::Store::Oracle module that it uses a=20 SELECT a_session FROM sessions WHERE id =3D ? FOR UPDATE =20 If a user clicks the stop button in their browser during a process (IE during a session update or setting the session) and then clicks another link this will sometimes cause apache to hang and the user must restart their browser. This will also cause the previous update=20 (UPDATE sessions SET a_session =3D ? WHERE id =3D ?) Oracle session to = hang within Oracle. Has anyone else on the list seen this problem? =20 Version Numbers:=20 mod_perl 1.27 Apache::DBI 0.88 Apache::SessionManager =3D 1.01 Apache::Session 1.54 DBI 1.40 DBD::Oracle 1.12 =20 =20 Current httpd.conf Apache::SessionManager setup =20 PerlModule Apache::DBI PerlRequire conf/startup.pl #oracle client environment variables SetEnv ORACLE_BASE /path/to/o01/oracle/app SetEnv ORACLE_HOME /path/to/o01/oracle/app SetEnv LD_LIBRARY_PATH /path/to/o01/oracle/app/lib PerlSetEnv ORACLE_HOME /path/to/o01/oracle/app PerlModule Apache::SessionManager PerlTransHandler Apache::SessionManager =20 <LocationMatch /.*/somedirectory/.*> PerlSetVar SessionManagerTracking On #PerlSetVar SessionManagerURITracking On PerlSetVar SessionManagerExpire 3600 PerlSetVar SessionManagerInactivity 900 PerlSetVar SessionManagerName SESSID PerlSetVar SessionManagerCookieArgs "Path =3D> /, Domain =3D> subdomain.mydomain.com" PerlSetVar SessionManagerStore Oracle PerlSetVar SessionManagerStoreArgs "DataSource =3D> dbi:Oracle:mydb, UserName =3D> *, Password =3D> *, LongReadLen =3D> 24576, Commit =3D> = 1" PerlSetVar SessionManagerDebug 9 PerlSetVar SessionManagerSetEnv On </LocationMatch> <Location /perl-status> SetHandler perl-script PerlHandler Apache::Status PerlSetVar StatusOptionsAll On </Location> =20 Inside the mod_perl application =20 $self->{session} =3D new Apache::SessionManager($r); =20 sub getSessionParam { my $self =3D shift; my $param =3D shift; return undef unless($param); my $s =3D $self->{session}; my ($sparam) =3D $s->get_session_param($self->client_name); if(defined $sparam->{$param}) { return $sparam->{$param}; } else { return undef; } } sub setSessionParam { my $self =3D shift; my $param =3D shift; my $value =3D shift; return undef unless($param && $value); my $s =3D $self->{session}; my ($sparam) =3D $s->get_session_param($self->client_name); $sparam->{$param} =3D $value; $s->set_session_param($self->client_name, $sparam); return $sparam; } =20 Last question =20 Apache::DBI->setPingTimeOut($data_source, $timeout) =20 This configures the usage of the ping method, to validate a connection. Setting the timeout to 0 will always validate the database connection using the ping method (default). Setting the timeout < 0 will de-acti- vate the validation of the database handle. This can be used for drivers, which do not implement the ping-method. Setting the timeout > 0 will ping the database only if the last access was more than timeout seconds before. =20 =20 Any help would be appreciated=20 =20 Sincerely Yours, Tyler Rorabaugh =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 ------_=_NextPart_001_01C4DD81.EC5D1760 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Dus-ascii"> <META content=3D"MSHTML 6.00.2800.1458" name=3DGENERATOR></HEAD> <BODY> <DIV dir=3Dltr align=3Dleft> </DIV> <DIV></DIV> <DIV><FONT face=3DArial size=3D2><SPAN class=3D120502715-07122004>Dear = mod_perl=20 list,</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial = size=3D2>Normally I would not=20 bother the mod_perl list with </FONT></SPAN></DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial = size=3D2>questions but I have=20 a problem with Apache::DBI, Apache::SessionManager and=20 Apache::Sessions</FONT></SPAN></DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial = size=3D2>regarding hanging=20 oracle sessions.</FONT></SPAN></DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial size=3D2>I have = noticed=20 within the </FONT></SPAN></DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial=20 size=3D2>Apache::Session::Store::Oracle module that it uses a = </FONT></SPAN></DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial size=3D2>SELECT = a_session=20 FROM sessions WHERE id =3D ? FOR UPDATE</FONT></SPAN></DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial size=3D2>If a = user clicks the=20 stop button in their browser during a process (IE during a session = update or=20 setting the session) and then clicks another = link</FONT></SPAN></DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial size=3D2>this = will sometimes=20 cause apache to hang and the user must restart their browser. This will = also=20 cause the previous update </FONT></SPAN></DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial = size=3D2>(UPDATE sessions SET=20 a_session =3D ? WHERE id =3D ?) Oracle session to hang within Oracle.=20 </FONT></SPAN><SPAN class=3D120502715-07122004><FONT face=3DArial = size=3D2>Has anyone=20 </FONT></SPAN><SPAN class=3D120502715-07122004><FONT face=3DArial = size=3D2>else on the=20 list seen this problem?</FONT></SPAN></DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial = size=3D2>Version Numbers:=20 </FONT></SPAN></DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial = size=3D2>mod_perl=20 1.27</FONT></SPAN></DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial = size=3D2>Apache::DBI=20 0.88</FONT></SPAN></DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial=20 size=3D2>Apache::SessionManager =3D 1.01</FONT></SPAN></DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial = size=3D2>Apache::Session=20 1.54</FONT></SPAN></DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial size=3D2>DBI=20 1.40<BR>DBD::Oracle 1.12</DIV></FONT></SPAN> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial = size=3D2>Current httpd.conf=20 Apache::SessionManager setup</FONT></SPAN></DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial = size=3D2>PerlModule=20 Apache::DBI</FONT></SPAN></DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial = size=3D2>PerlRequire=20 conf/startup.pl<BR><BR>#oracle client environment variables<BR>SetEnv=20 ORACLE_BASE /path/to/o01/oracle/app<BR>SetEnv ORACLE_HOME=20 /path/to/o01/oracle/app<BR>SetEnv LD_LIBRARY_PATH=20 /path/to/o01/oracle/app/lib<BR></FONT></DIV> <DIV><FONT face=3DArial size=3D2>PerlSetEnv ORACLE_HOME=20 /path/to/o01/oracle/app<BR>PerlModule = Apache::SessionManager<BR>PerlTransHandler=20 Apache::SessionManager</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2><LocationMatch /.*/<SPAN=20 class=3D120502715-07122004>somedirectory</SPAN>/.*><BR>PerlSetVar=20 SessionManagerTracking On<BR>#PerlSetVar SessionManagerURITracking=20 On<BR>PerlSetVar SessionManagerExpire 3600<BR>PerlSetVar=20 SessionManagerInactivity 900<BR>PerlSetVar SessionManagerName=20 SESSID<BR>PerlSetVar SessionManagerCookieArgs "Path =3D> = /, Domain=20 =3D> <SPAN=20 class=3D120502715-07122004>subdomain.mydomain.com</SPAN>"<BR>PerlSetVar=20 SessionManagerStore Oracle<BR>PerlSetVar SessionManagerStoreArgs = "DataSource=20 =3D> dbi:Oracle:<SPAN class=3D120502715-07122004>mydb</SPAN>, = UserName =20 =3D> <SPAN class=3D120502715-07122004>*</SPAN>, = Password =20 =3D> <SPAN class=3D120502715-07122004>*</SPAN>, LongReadLen = =3D> 24576,=20 Commit =3D> 1"<BR>PerlSetVar SessionManagerDebug 9<BR>PerlSetVar=20 SessionManagerSetEnv On<BR></LocationMatch><BR></FONT></DIV> <DIV><FONT face=3DArial size=3D2><Location = /perl-status><BR>SetHandler =20 perl-script<BR>PerlHandler Apache::Status<BR>PerlSetVar StatusOptionsAll = On<BR></Location><BR></DIV></FONT> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial size=3D2>Inside = the mod_perl=20 application</FONT></SPAN></DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial = size=3D2>$self->{session}=20 =3D new Apache::SessionManager($r);</FONT></SPAN></DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial size=3D2>sub = getSessionParam=20 {<BR> my $self =3D shift;<BR> my = $param =3D=20 shift;<BR> return undef = unless($param);<BR> =20 my $s =3D $self->{session};<BR> my ($sparam) =3D=20 $s->get_session_param($self->client_name);<BR> =20 if(defined $sparam->{$param}) = {<BR> =20 return $sparam->{$param};<BR> } else=20 {<BR> return=20 undef;<BR> }<BR>}<BR></FONT></SPAN></DIV><SPAN=20 class=3D120502715-07122004> <DIV><FONT face=3DArial size=3D2>sub setSessionParam = {<BR> my=20 $self =3D shift;<BR> my $param =3D = shift;<BR> my=20 $value =3D shift;<BR> return undef unless($param = &&=20 $value);<BR> my $s =3D=20 $self->{session};<BR> my ($sparam) =3D=20 $s->get_session_param($self-><SPAN=20 class=3D120502715-07122004>client_name</SPAN>);<BR> =20 $sparam->{$param} =3D $value;<BR> =20 $s->set_session_param($self-><SPAN=20 class=3D120502715-07122004>client_name</SPAN>, = $sparam);<BR> =20 return $sparam;<BR>}</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN class=3D120502715-07122004>Last=20 question</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D120502715-07122004></SPAN></FONT> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D120502715-07122004>Apache::DBI->setPingTimeOut($data_source,=20 $timeout)</SPAN></FONT></DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D120502715-07122004> This = configures=20 the usage of the ping method, to validate a=20 connection.<BR> Setting the timeout = to 0=20 will always validate the database=20 connection<BR> using the ping method = (default). Setting the timeout < 0 will=20 de-acti-<BR> vate the validation of = the=20 database handle. This can be used = for<BR> =20 drivers, which do not implement the ping-method. Setting the timeout=20 ><BR> 0 will ping the database = only if=20 the last access was more than = timeout<BR> =20 seconds before.<BR></SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D120502715-07122004></SPAN></FONT> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D120502715-07122004></SPAN></FONT></SPAN> </DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial = size=3D2>Any help would=20 be appreciated </FONT></SPAN></DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial = size=3D2>Sincerely=20 Yours,</FONT></SPAN></DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial size=3D2>Tyler=20 Rorabaugh</FONT></SPAN></DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial=20 size=3D2> </DIV></FONT></SPAN> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2> </DIV></FONT></SPAN> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D120502715-07122004><FONT face=3DArial=20 size=3D2></FONT></SPAN> </DIV></BODY></HTML> ------_=_NextPart_001_01C4DD81.EC5D1760--
![]() |
(message missing) |
![]() |
![]() |
Hanging Apache && Oracle Sessions with Apache::DBI, Apache::SessionManager, Oracle 9i,
|
![]() |
![]() |
Hanging Apache && Oracle Sessions with Apache::DBI, Apache::SessionManager, Oracle 9i,
|
![]() |
![]() |
![]() |
Re: Hanging Apache && Oracle Sessions with Apache::DBI, Apache::SessionManager, Oracle 9i,
|
Generated at 11:26 on 21 Dec 2004 by mariachi v0.52