in reply to Re: Database handler shared among forked processes
in thread Database handler shared among forked processes

Thank you for your reply. I'm afraid that you are right: I'll have to implement one connection to Oracle in each child. Anyway I'm not very pleased with this solution: connection to database is expensive both in term of resources and time ... and if my daemon starts having lots of requests I will end up having a lot of database connections ...
Perhaps this is an area where Perl is sort of weak? I don't know, I'm a great fun of Perl :)

Thank you very much marcos
  • Comment on Re: Re: Database handler shared among forked processes

Replies are listed 'Best First'.
Re: Re: Re: Database handler shared among forked processes
by mpeppler (Vicar) on Jun 11, 2002 at 17:45 UTC
    You can write your system so that your child processes are persistent.

    You then communicate between the master (that gets the requests) and each of the children through some form of pipe (maybe Unix sockets) and the child processes can then avoid re-connecting for each request.

    The code obviously gets more complicated, but it's certainly feasible.

    Michael