Re: Parallel::ForkManager && DBI memory leak ?
From: Cosimo Streppone (cstreppone_at_team2k.net)
Date: 12/29/04
- Previous message: Ron Wingfield: "Re: Problem with "while/fetchrow_array""
- In reply to: Robert Follett: "RE: Parallel::ForkManager && DBI memory leak ?"
- Next in thread: Ron Wingfield: "Re: Parallel::ForkManager && DBI memory leak ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 29 Dec 2004 19:08:27 +0100 To: "Follett, Robert" <robert.follett@Vanderbilt.Edu>
Follett, Robert wrote:
> You will get much better performance by connecting once, outside your
> foreach loop as well as disconnecting and finishing after the loop.
Having tried this, I can assure you that connecting *inside* the loop
is the only alternative here.
In fact, for every loop iteration, Parallel::ForkManager starts up a
new process (`$pm->start()') that *must* take care of (re)connecting
to database, because AFAIK DBI handles will not stay shared
among different processes.
-- Cosimo
- Previous message: Ron Wingfield: "Re: Problem with "while/fetchrow_array""
- In reply to: Robert Follett: "RE: Parallel::ForkManager && DBI memory leak ?"
- Next in thread: Ron Wingfield: "Re: Parallel::ForkManager && DBI memory leak ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|