Perl: the Markov chain saw | |
PerlMonks |
DBIx or Catalyst problem: Lost connection to MySQL server during queryby Largo (Novice) |
on Jan 16, 2017 at 14:04 UTC ( [id://1179665]=perlquestion: print w/replies, xml ) | Need Help?? |
Largo has asked for the wisdom of the Perl Monks concerning the following question: Hi there! I'm working on a project using the Catalyst framework. The db access is done by DBIx::Class. All works fine until the queries get too complicated and take too long to run. Therefore I wrote a test script to find out if there is a fix amount of time after which the db crashes and the answer is yes. If a query takes longer than 50 seconds then we get the error msg: DBI Exception: DBD::mysql::st execute failed: Lost connection to MySQL server during queryFor testing I use the query "SELECT SLEEP(n);" which does nothing but to sleep for n seconds and then returns. A typical run:
"encs" is my Catalyst class. 50 seconds are running through and 51 seconds are failing. Interestingly the query breaks everey time after 51 seconds, but it's not the mysql server that ends the connection. There ist no error message at the mysql server. If I setup a DBI connection on my own, without Catalyst, then it runs as long as it takes. Therefore I think it's an Catalyst/DBIx issue.
Does anybody have an idea what is the problem? How I could configure Catalyst to avoid this timeout? Thx, Lars
Back to
Seekers of Perl Wisdom
|
|