Hello, I have a question, about ithreads and the DBI-module. I use threads in a perl-script which is a Monitor for an other Aplication, so my script runs as daemon and starts threads which connect to the DB collect some data and come back. My Problem is, that my script starts the thread every 2 Minutes by the cron-module. So I open at the moment every 2 Minutes a DBI-connection. This is not very nice for the DB.
So I search a method where I can store my DB-handel. I tested with connect_cached but then every new thread makes a new connection to the DB. And it is not possible to make a connect in the father-thread because DBI sayd the DB-handel is not yours, it is from an other thread :-(( But I think this should be possible because the Apache::DBI do this, when I understand the Apache::DBI correctly. Gruß Alex