First off- thank you perrin , i'm a step closer to fully
understanding this.
On Jul 12, 2007, at 9:14 PM, Perrin Harkins wrote:
No. This is explicit shared memory, not a mysterious copy-on-write
thing. You need to initiate access separately from each process so
that none of the XS stuff is shared, just as you would with RDBMS
connections.
I knew all that...
There might be some way to safely open the database in the parent
process, especially if you're doing read-only access, or it might be
smart enough to figure out the PID changed and do whatever it needs to
do. Feel free to comb the BDB docs for it. I don't think there's any
advantage to doing so though.
I think this touches on what my issue was...
in order to keep the memory shared, wouldn't you have to always have
an open process? Wouldn't the only way to ensure this be to open up
something pre-fork, in the apache parent?
I'm thinking of the situation where you have 1 parent, 4 children.
all 4 children hit max-requests and exit before the first replacement
spawns. without a standing connection in the parent (or another
process using bdb in any way ) wouldn't that memory be released back
to the system , and a new memory space be started on the spawn?
i know this is an edge case... i'm just trying to wrap my head around
the whole thing to see if this behaves as I think it does.