Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Catalyst (app_)server.pl hangs a lot

by Your Mother (Archbishop)
on Nov 03, 2011 at 19:14 UTC ( [id://935753]=note: print w/replies, xml ) Need Help??


in reply to Catalyst (app_)server.pl hangs a lot

The dev server is generally just for testing but it’s also pretty robust and some devs have deployed it to production.

The only times I’ve seen the sort of thing you describe is when doing wonky fork/self-referential code. A potential help would be to add a -k to the command line in case things are just blocking somewhere. You could also start with perl -MCarp::Always script/myapp_server.pl ....

Barring success with that, and not being a perl -d kinda dev unless backed into a corner, I tend to remove new code to get back to a functioning version and then progressively return things till I discover the fail point. I have hardly had to do this since becoming more serious about writing tests for individual pieces before trying to mix them. Skipping test writing is a false economy and there is a wealth of test appliances for Perl and Catalyst.

Replies are listed 'Best First'.
Re^2: Catalyst (app_)server.pl hangs a lot
by miguelele (Beadle) on Nov 07, 2011 at 22:37 UTC

    Finally: the server hangs after five minutes of inactivity when the database is in a remote host.

    A) Recreating the database in the same server that is running Catalyst -> OK

    B) Installing Catalyst in the server server that is running the database -> OK

    I can live with that by now because "B" will be the production environment. But surely I will come back, because using a remote database seems to be a good option to consider.

    Thank you for your interest

Re^2: Catalyst (app_)server.pl hangs a lot
by miguelele (Beadle) on Nov 03, 2011 at 21:47 UTC

    Wowo, I have returned to my computer and the last page I tested has finally rendered!!. Las action took 968.4581s. So the server script does not hangs. It is heavily delayed!!.

    I wonder how I can monitor the action even deeper

      I wonder how I can monitor the action even deeper

      Finding such a huge delay should be easy, just look for one of sleep, DBI...execute, or for(1..1_000_000){ DoSomethingExpensive(); }

      This being a Catalyst app, look in your model

        Well, it seems like a time out of some kind. About FIVE minutes

        I can repeat the same action (reload the page) as many or as few times as I want. Then I leave it for a while, about five minutes, and when I reload the page (even from another computer) I get the weird big delay again.

        Can you imagine what can have such five minutes timeout? DBI configuration or something?

Re^2: Catalyst (app_)server.pl hangs a lot
by miguelele (Beadle) on Nov 05, 2011 at 15:03 UTC

    I tried to run the server with keepalive... and it works fine!! With all the queries and models running.

    I do not understand. Is this the "correct" way?

    While developing I am the only user, and I have even stripped the app down to just one query without success if I turn off keepalive again.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://935753]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-04-16 10:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found