On Thu, 2005-12-08 at 14:42 +1100, brett gardner wrote:
> I had a problem where I was calling components, and passing in arguments 
> from the session directly
> 
> eg
> 
> <& comp.mas, arg1=>$m->session->{ARG1} &>
> 
> caused it to lock up but
> 
> % my $arg1 = $m->session->{ARG1};
> <& comp.mas, arg1=>$arg1 &>
> 
> worked fine.

        I think this is the problem! I do this on the index page that hangs. I
went in, commented out the components that pass session arguments, tried
it again and it doesn't hang. Its a relevantly recent problem since this
same code works on my production box which has older versions of apache,
mysql, mason, etc. 

Justin


> Justin Cook wrote:
> 
> >I've been looking into what is causing my Mason app to hang and I'm
> >almost sure that its when Apache::Session::Lock::MySQL does:
> >
> ><snip>
> >    my $sth = $self->{dbh}->prepare_cached(q{SELECT GET_LOCK(?, 3600)},
> >{}, 1);
> >    $sth->execute($self->{lockid});
> ></snip>
> >
> >     If I change the timeout from 3600(1 hour) to a couple of seconds the
> >app doesn't hang. Is this dumb to leave like this? One other thing I
> >notice is that when I find the app hanging(and it seems to hang when it
> >initializes a database connection) I look at  mysql running processes
> >and find a couple - one thats doing the GET_LOCK on the session table
> >and another one that's sleeping. When I kill the sleeping one the page
> >then loads. Help!!
> >
> >Justin
> >
> >
> >
> >On Mon, 2005-12-05 at 16:54 -0500, Justin Cook wrote:
> >  
> >
> >>if you mean within the .mhtml file calling other components, yes. 
> >>
> >>On Tue, 2005-12-06 at 08:31 +1100, brett gardner wrote:
> >>    
> >>
> >>>Justin
> >>>
> >>>Are you using any sub requests?
> >>>
> >>>Brett
> >>>
> >>>Justin Cook wrote:
> >>>
> >>>      
> >>>
> >>>>Hi,
> >>>>
> >>>>Just did a fresh install of Apache 1.3 with mod_perl 1.29 and grabbed
> >>>>Apache::Session and MasonX::Request::WithApacheSession. I set it up like
> >>>>my production server and got my mason site up and running. The problem
> >>>>is now the index.mhtml page will hang indefinitely, sometimes a refresh
> >>>>will load the page, other times it won't. It will load for IE on another
> >>>>computer but will hang in Mozilla on linux on another. I can find no
> >>>>errors in the logs but when I switched my session_handler.pl from:
> >>>>
> >>>><snip>
> >>>># Create ApacheHandler object
> >>>>#
> >>>>my %ah;
> >>>>foreach my $site (qw(quotewright.com)) {
> >>>>$ah{$site} =
> >>>>   new HTML::Mason::ApacheHandler
> >>>>       ( request_class => 'MasonX::Request::WithApacheSession',
> >>>>         session_class => 'Apache::Session::MySQL',
> >>>>         session_data_source => 'dbi:mysql:travins',
> >>>>         session_user_name => 'user',
> >>>>         session_password => 'password',
> >>>>         session_lock_data_source => 'dbi:mysql:travins',
> >>>>         session_lock_user_name => 'user',
> >>>>         session_lock_password => 'password',
> >>>>         session_args_param => 'session_id',
> >>>>         # Let MasonX::Request::WithApacheSession automatically
> >>>>         # set and read cookies containing the session id
> >>>>         session_use_cookie => 1,
> >>>>         session_cookie_name => "$site",
> >>>>         comp_root => "/usr/local/apache/htdocs/$site",
> >>>>         data_dir => "/var/$site" );
> >>>>}
> >>>></snip>
> >>>>
> >>>>to this:
> >>>>
> >>>><snip>
> >>>>my %ah;
> >>>>foreach my $site (qw(quotewright.com)) {
> >>>>
> >>>>$ah{$site} =
> >>>>   new HTML::Mason::ApacheHandler
> >>>>       ( request_class => 'MasonX::Request::WithApacheSession',
> >>>>         session_class => 'Apache::Session::File',
> >>>>         session_args_param => 'session_id',
> >>>>         session_directory => '/tmp/sessions/data',
> >>>>         session_lock_directory => '/tmp/sessions/locks',
> >>>>         session_use_cookie => 1,
> >>>>         session_cookie_domain => "$site",
> >>>>         comp_root => "/usr/local/apache/htdocs/$site",
> >>>>         data_dir => "/var/$site" );
> >>>>}
> >>>>
> >>>>This loads the index.mhtml page but then hangs when a form is submitted
> >>>>        
> >>>>
> >>>>from this page. I do use the session to put about 8-10 parameters in,
> >>>      
> >>>
> >>>>which I read somewhere is not a good idea. Would this cause a problem
> >>>>using the MySQL data store module? The funny thing is the same code
> >>>>works well on my production box that has apache 1.3.31, mod_perl 1.29
> >>>>and mason 1.29. This new box has apache 1.3.33, mod_perl 1.29 and mason
> >>>>1.31(I think - whatever the version is in CPAN). Is MX::R::WAS getting
> >>>>flaky?
> >>>>
> >>>>Justin
> >>>>
> >>>>
> >>>>
> >>>>-------------------------------------------------------
> >>>>This SF.net email is sponsored by: Splunk Inc. Do you grep through log 
> >>>>files
> >>>>for problems?  Stop!  Download the new AJAX search engine that makes
> >>>>searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> >>>>http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> >>>>_______________________________________________
> >>>>Mason-users mailing list
> >>>>[email protected]
> >>>>https://lists.sourceforge.net/lists/listinfo/mason-users
> >>>>
> >>>>
> >>>> 
> >>>>
> >>>>        
> >>>>
> >>
> >>-------------------------------------------------------
> >>This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> >>for problems?  Stop!  Download the new AJAX search engine that makes
> >>searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> >>http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> >>_______________________________________________
> >>Mason-users mailing list
> >>[email protected]
> >>https://lists.sourceforge.net/lists/listinfo/mason-users
> >>    
> >>
> >
> >
> >
> >-------------------------------------------------------
> >This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> >for problems?  Stop!  Download the new AJAX search engine that makes
> >searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> >http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> >_______________________________________________
> >Mason-users mailing list
> >[email protected]
> >https://lists.sourceforge.net/lists/listinfo/mason-users
> >
> >
> >  
> >
> 



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to