Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users
Hangs in RenderView in "end"
 

Index | Next | Previous | View Flat


gunnarstrand at yahoo

Jun 27, 2009, 11:35 PM


Views: 1867
Permalink
Hangs in RenderView in "end"

Hi,

I am new to the Catalyst framework and am running Catalyst on Kubuntu Linux using the built-in server with the TT view and DBIC database backend.

My problem is that sometimes the "end" sub in Root.pm hangs. All it has is the RenderView action (as generated by Catalyst), so I assume that is the culprit.

If I return the same template as was previously displayed on the page, then it hangs. There appears to be other occasions as well, but I haven't found any pattern yet.

Here is an example output from the terminal:

[info] *** Request 11 (0.000/s) [5758] [Sun Jun 28 08:11:16 2009] ***
[debug] Body Parameters are:
.-------------------------------------+--------------------------------------.
| Parameter | Value |
+-------------------------------------+--------------------------------------+
| Create | Create user |
| password | x |
| username | kalle |
| verify_password | y |
'-------------------------------------+--------------------------------------'
[debug] "POST" request for "users/create" from "127.0.0.1"
[debug] Path is "users/create"
[debug] Found sessionid "29eee4bdb13bf24aa256c7dfebd87a5816ee5bc9" in cookie
[debug] Restored session "29eee4bdb13bf24aa256c7dfebd87a5816ee5bc9"
[debug] Rendering template "users/create_form.tt2"
[info] Request took 795.658106s (0.001/s)
.------------------------------------------------------------+-----------.
| Action | Time |
+------------------------------------------------------------+-----------+
| /users/create | 0.005603s |
| /end | 795.6377s |
| -> Cupper::View::TT->process | 795.6356s |
'------------------------------------------------------------+-----------'

As you can see, "end" has hanged in 795 seconds, and this output was not printed until AFTER I hit "Stop" in Firefox. Below is the code in users/create:

sub create : Local : ActionClass('Restricted') {
my ( $self, $c ) = @_;

# Retrieve the values from the form
my $username = $c->request->params->{username};
my $password = $c->request->params->{password};
my $verify_password = $c->request->params->{verify_password};

if ( ! $username || 4 < length $username ) {
$c->stash->{error_msg} = $c->localize('User name must be at least 5 characters long.');
$c->stash->{template} = 'users/create_form.tt2';
return;
}

if ( $password ne $verify_password ) {
$c->stash->{error_msg} = $c->localize('Passwords does not match.');
$c->stash->{template} = 'users/create_form.tt2';
return;
}

# Create the user
my $user = $c->model('DB::Users')->create(
{
user_id => 1,
username => $username,
password => $password,
}
);

# Store new model object in stash
$c->stash->{template} = 'users/list.tt2';
}


This particular request should take the "$password ne $verify_password" path and return the user to the "users/create_form" function.

Here is the content of the "Restricted" action:

sub execute {
my $self = shift;
my ( $controller, $c, $test ) = @_;

unless ( $c->user_exists() ) {
warn "BEFORE redirect";
$c->forward('/users/login_form');
warn "AFTER redirect";
return;
}
$self->NEXT::execute(@_);
}


I am unable to run a debugger on the catalyst server (I get a segmantation fault), so it is difficult to find exactly where
problem is.

Any help is appreciated.

KR,
Gunnar

Subject User Time
Hangs in RenderView in "end" gunnarstrand at yahoo Jun 27, 2009, 11:35 PM
    Re: Hangs in RenderView in "end" bobtfish at bobtfish Jun 28, 2009, 8:13 AM
        Re: Hangs in RenderView in "end" gunnarstrand at yahoo Jun 28, 2009, 8:50 AM
            Re: Hangs in RenderView in "end" bobtfish at bobtfish Jun 28, 2009, 9:24 AM
                Re: Hangs in RenderView in "end" gunnarstrand at yahoo Jun 28, 2009, 9:39 PM
                    Re: Hangs in RenderView in "end" gunnarstrand at yahoo Jul 2, 2009, 1:33 PM
                        Re: Hangs in RenderView in "end" bobtfish at bobtfish Jul 2, 2009, 2:47 PM
                        Re: Hangs in RenderView in "end" anexiole at gmail Jul 8, 2009, 5:47 AM
    Re: Hangs in RenderView in "end" gunnarstrand at yahoo Jul 5, 2009, 9:33 PM
        Re: Hangs in RenderView in "end" bobtfish at bobtfish Jul 6, 2009, 1:13 AM
    Re: Hangs in RenderView in "end" anexiole at gmail Jul 8, 2009, 5:57 AM
    Re: Hangs in RenderView in "end" gunnarstrand at yahoo Jul 8, 2009, 8:19 AM
    Re: Hangs in RenderView in "end" bobtfish at bobtfish Jul 8, 2009, 9:42 AM
        Re: Hangs in RenderView in "end" anexiole at gmail Jul 8, 2009, 2:14 PM
    Re: Hangs in RenderView in "end" gunnarstrand at yahoo Jul 8, 2009, 11:45 PM
        Re: Hangs in RenderView in "end" bobtfish at bobtfish Jul 11, 2009, 5:06 PM
    Re: Hangs in RenderView in "end" anexiole at gmail Jul 13, 2009, 4:55 AM
    Re: Hangs in RenderView in "end" anexiole at gmail Jul 15, 2009, 1:31 AM
    Re: Hangs in RenderView in "end" bobtfish at bobtfish Jul 15, 2009, 2:08 PM
        Re: Hangs in RenderView in "end" kakimoto at tpg Jul 15, 2009, 5:25 PM
            Re: Hangs in RenderView in "end" anexiole at gmail Jul 15, 2009, 5:57 PM
            Re: Hangs in RenderView in "end" anexiole at gmail Jul 15, 2009, 7:20 PM
    Re: Hangs in RenderView in "end" romkey at apocalypse Jul 16, 2009, 6:53 AM
    Re: Hangs in RenderView in "end" anexiole at gmail Jul 16, 2009, 4:09 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.