Sep 1, 2009, 10:25 AM
Post #1 of 6
I have two questions:
1)I'm looking for some help on making each child maintain it's own connection to a mysql database using DBI. I've tried putting the DB connection in post_bind_hook(), post_configure_hook() and pre_loop_hook(). But when I check the fullprocesslist, I only see one connection from my application, even though I have 5 children preforked. I don't think that process_connection() would be a good place, because I would like the DB connection to be maintained, not set up and destroyed with each incoming connection.
2)I want to create a hash table that each child has access to, but I need to be able to update the table without restarting the script, so that each child has access to the same information. I think that having the parent maintain the hash, and the children read from the parent via a socket or pipe or semaphore, would work, but I'm not sure how/where to place the code for the parent, to do this.
Thanks for your help,