[Catalyst] Frequent crashes with DBI using test server?

Kirby Krueger kirbykr at u.washington.edu
Wed Jun 11 00:21:16 BST 2008

Forgive me if this is a newbie question.  I have a suspicion I'm  
missing something obvious, but I can't find the answer with a google  

I'm developing my first Catalyst application, and it's going fairly  
well.  For now, I'm using the test server (ie, scripts/ 
myapp_server.pl), which is great for where I'm at now.

The problem is: I'm connecting to a local MySQL database in my model  
over a socket.  Frequently but intermittently, this seems to get  
corrupted.  I get messages like:

DBIx::Class::ResultSet::next(): DBI Connection failed: Can't connect  
to local MySQL server through socket 'ple::Cookie' (2) at  ...

(Refresh changes the nonsense after the word socket, the 'ple::Cookie'  
in this case.)

If I restart the server, and hit refresh, it works fine.  Sometimes I  
can get a dozen or so requests through, sometimes only one or two.

I've got an abstraction layer in front of my model - not using  
DBIx::Class directly as the model, but it does use a perl library that  
ultimately does use DBIx::Class.  I don't see these kinds of problems  
from my unit tests directly against the libraries that the model uses.

Is this a known issue with the standalone server?  Or am I not doing  
something I ought with the database layer?

Thanks for any pointers,


More information about the Catalyst mailing list