Re: Memory Issues

[prev] [thread] [next] [Date index for 2005/02/10]

From: Leo
Subject: Re: Memory Issues
Date: 19:48 on 10 Feb 2005
Thanks Perrin

Perrin Harkins wrote:

>Yes, although I think you mean "proxy" rather than "redirect."
>  
>

You're right. mod_proxy

>  
>
>> However the configuration of my 
>>lightweight apache seems daunting.
>>    
>>
>
>It's not very hard to set up reverse proxying.  You don't even need
>mod_rewrite for the basic things.
>
>  
>
>>Use the startup handler (called during startup before the child 
>>processes are spawned right?) to calculate what the "application data" 
>>should be and intialize the tied "mod counter" hoping that it will never 
>>change :(.   I suppose when the machine goes into production, if changes 
>>should occur infrequently or upon modification of certain data then you 
>>simply restart the server and thus keep this readonly "application" 
>>stuff in a shared memory space.
>>    
>>
>
>I'm not quite following what "mod counter" is, but loading static data
>at startup is pretty common.
>
>  
>
I probably doesn't matter anymore but I use a normal Apache::SessionX 
created with sessID 1, 2, (some fixed number that could never be 
generated).  Within the hash I use a serial number (modification 
counter) that starts at 1 and is incremented on each update.  (much the 
way bind uses it's serial numbers)

Because application data should be the same across all processes (and I 
didn't think to use your suggestioned solutions below)  when a request 
comes in, I tie the application session, check to see if my modification 
counter are equal.  If it is then just untie the hash, If the 
modification number number has changed then before the untie I do my 
data sync operation.  It's really an ugly way to keep things from 
breaking in my test environment.  I got the idea from one of the man 
pages that came with Apache::Session I think.

>>Is there a 
>>way update data in shared memory without apache creating a local copy?
>>    
>>
>
>No.  To share read/write data, you should use something like
>Cache::FastMmap or BerkeleyDB instead.
>
>  
>
I have to check these out.  Thanks.

>- Perrin
>
>
>  
>
Leo

Memory Issues
Leo 18:56 on 10 Feb 2005

Re: Memory Issues
Perrin Harkins 19:20 on 10 Feb 2005

Re: Memory Issues
Leo 19:48 on 10 Feb 2005

Re: Memory Issues
Perrin Harkins 20:37 on 10 Feb 2005

Generated at 10:21 on 11 Feb 2005 by mariachi v0.52