Daemon & threads

[prev] [thread] [next] [Date index for 2005/01/14]

From: Daniel Wijnands
Subject: Daemon & threads
Date: 19:47 on 14 Jan 2005
I have build a daemon that has the following design 

dameon 
- query database with class-dbi objects 
- triggering some events and start a new thread by fork 

	thread 
	- inherits class::dbi object from daemon 

All works very well, and nice until i cet something like this : 

Fri Jan 14 11:54:17 2005 Mailing daemon send : 31904 finished
Fri Jan 14 20:34:45 2005  Mailing daemon connector  [47685=thread|
42=mailing]
Database::Mailing can't SELECT mailid
FROM   mailing
WHERE  ( mailStaterun = ? AND mstId = ? )
: DBD::mysql::st execute failed: Lost connection to MySQL server during
query [for Statement "SELECT mailid
FROM   mailing
WHERE  ( mailStaterun = ? AND mstId = ? )
"] at /usr/local/lib/perl5/site_perl/5.8.5/DBIx/ContextualFetch.pm line
51.
 at /usr/local/lib/perl5/site_perl/5.8.5/Class/DBI/AbstractSearch.pm
line 31


I have search on google and the docs, and the problem seems to be tha
Ima::DBI doesn't play safe with mysql. I have tried to overide db_Main
bu that is also no solution. 

Can anybody point me to the right direction ?

Kind regards 

Daniel Wijnands

Daemon & threads
Daniel Wijnands 19:47 on 14 Jan 2005

Re: Daemon & threads
Perrin Harkins 21:03 on 17 Jan 2005

Generated at 17:42 on 27 Jan 2005 by mariachi v0.52