On Aug 15, 2006, at 4:28 PM, Perrin Harkins wrote:
If that happens even when you just send the same request every time to
the same process, there's something extra going on, like a variable not
going out of scope or being added to each time.

It took me 4 hours to track this down, I finally did.

Can someone confirm if there is a memory leak in Apache Session ?


        my      %session;
        my      $store= $self->ApacheSessionStore ;
        my      $options= $self->ApacheSessionOptions->{ $store };
DEBUG && print STDERR "\nTying? Apache::Session::Postgres - $sessionID";
                        eval{
                                if ( $options->{'Handle'} ) {
                                        tie %session , 
'Apache::Session::Postgres', $sessionID, {
                                                'Handle'=> $options->{'Handle'} 
,
                                                'Commit'=> $options->{'Commit'} 
,
                                        };
                                }
                                else {
                                        tie %session , 
'Apache::Session::Postgres', $sessionID, $options ;
                                }
                        } ;
                        if ( $@ ) {
                                $error= 1;
                                $sessionID= undef;
                        }

In my example $options comes from a constant in a child class of the method's class -- but i've tried converting it to a hash (walking it) and creating a new hash by hand-- neither has leak in memory from reading it.

No matter what $options is (tested on pg / mysql ) -- i've tried $, \ % , { k=> v }

unless i die by passing in bad data, i seem to get a 4k/request loss -

the loss happens directly after the tie.

Reply via email to