Re: Shared var between processes

2017-10-22 Thread Ben RUBSON
On 22 Oct 2017 23:15, André Warnier (tomcat) wrote: On 22.10.2017 18:59, John Dunlap wrote: In our case, we do not use Windows for anything. Even our desktops are Linux. We already employ Redis, which performs the same function as memcache, however, this doesn't really solve the problem beca

Re: Shared var between processes

2017-10-22 Thread John Dunlap
At present, I am pulling the values from PerlSetVar and constructing this hash in a lexical scoped variable. The hash gets a new entry every time the worker handles a request for a new virtualhost On Oct 22, 2017 5:15 PM, "André Warnier (tomcat)" wrote: > On 22.10.2017 18:59, John Dunlap wrote:

Re: Shared var between processes

2017-10-22 Thread tomcat
On 22.10.2017 18:59, John Dunlap wrote: In our case, we do not use Windows for anything. Even our desktops are Linux. We already employ Redis, which performs the same function as memcache, however, this doesn't really solve the problem because each virtualhost also relies on its own redis data

Re: Shared var between processes

2017-10-22 Thread John Dunlap
In our case, we do not use Windows for anything. Even our desktops are Linux. We already employ Redis, which performs the same function as memcache, however, this doesn't really solve the problem because each virtualhost also relies on its own redis database so, even in that case, we would still ne

Re: Shared var between processes

2017-10-22 Thread tomcat
On 22.10.2017 09:45, Ben RUBSON wrote: On 21 Oct 2017 08:53, André Warnier (tomcat) wrote: On 20.10.2017 17:15, Adam Prime wrote: On 17-10-20 05:17 AM, André Warnier (tomcat) wrote: On 20.10.2017 10:50, Ben RUBSON wrote: On 20 Oct 2017 10:38, André Warnier (tomcat) wrote: I believe that the

Re: Shared var between processes

2017-10-22 Thread Ben RUBSON
On 21 Oct 2017 08:53, André Warnier (tomcat) wrote: On 20.10.2017 17:15, Adam Prime wrote: On 17-10-20 05:17 AM, André Warnier (tomcat) wrote: On 20.10.2017 10:50, Ben RUBSON wrote: On 20 Oct 2017 10:38, André Warnier (tomcat) wrote: I believe that there is much more of a performance hit, whe

Re: Shared var between processes

2017-10-22 Thread tomcat
On 21.10.2017 21:20, john edstrom wrote: What about IPC::Shareable? Its for shared memory. I've used it before, but not with Apache. I'm no sure that works well under Windows. (The whole point for me of Apache/perl/mod_perl being that it is multi-platform) There is also memcache, but that's a

Re: Shared var between processes

2017-10-21 Thread john edstrom
What about IPC::Shareable? Its for shared memory. I've used it before, but not with Apache. JE On Sat, 2017-10-21 at 08:53 +0200, André Warnier (tomcat) wrote: > On 20.10.2017 17:15, Adam Prime wrote: > > On 17-10-20 05:17 AM, André Warnier (tomcat) wrote: > >> On 20.10.2017 10:50, Ben RUBSO

Re: Shared var between processes

2017-10-20 Thread tomcat
On 20.10.2017 17:15, Adam Prime wrote: On 17-10-20 05:17 AM, André Warnier (tomcat) wrote: On 20.10.2017 10:50, Ben RUBSON wrote: On 20 Oct 2017 10:38, André Warnier (tomcat) wrote: I believe that there is much more of a performance hit, when asking the server to set up an environment ($ENV)

Re: Shared var between processes

2017-10-20 Thread tomcat
On 20.10.2017 11:36, Ben RUBSON wrote: On 20 Oct 2017 11:17, André Warnier (tomcat) wrote: On 20.10.2017 10:50, Ben RUBSON wrote: On 20 Oct 2017 10:38, André Warnier (tomcat) wrote: On 19.10.2017 22:02, John Dunlap wrote: To piggy back onto this question, what is the best way to do this suc

Re: Shared var between processes

2017-10-20 Thread Adam Prime
On 17-10-20 05:17 AM, André Warnier (tomcat) wrote: On 20.10.2017 10:50, Ben RUBSON wrote: On 20 Oct 2017 10:38, André Warnier (tomcat) wrote: I believe that there is much more of a performance hit, when asking the server to set up an environment ($ENV) for sub-processes, than via the PerlSet

Re: Shared var between processes

2017-10-20 Thread Ben RUBSON
On 20 Oct 2017 11:17, André Warnier (tomcat) wrote: On 20.10.2017 10:50, Ben RUBSON wrote: On 20 Oct 2017 10:38, André Warnier (tomcat) wrote: On 19.10.2017 22:02, John Dunlap wrote: To piggy back onto this question, what is the best way to do this such that the values of the variables are

Re: Shared var between processes

2017-10-20 Thread tomcat
On 20.10.2017 10:50, Ben RUBSON wrote: On 20 Oct 2017 10:38, André Warnier (tomcat) wrote: On 19.10.2017 22:02, John Dunlap wrote: To piggy back onto this question, what is the best way to do this such that the values of the variables are different for every virtual host? In our model, all vi

Re: Shared var between processes

2017-10-20 Thread Ben RUBSON
On 20 Oct 2017 10:38, André Warnier (tomcat) wrote: On 19.10.2017 22:02, John Dunlap wrote: To piggy back onto this question, what is the best way to do this such that the values of the variables are different for every virtual host? In our model, all virtual hosts shared the same interprete

Re: Shared var between processes

2017-10-20 Thread tomcat
On 19.10.2017 22:02, John Dunlap wrote: To piggy back onto this question, what is the best way to do this such that the values of the variables are different for every virtual host? In our model, all virtual hosts shared the same interpreter pool but we need to have different configuration vari

Re: Shared var between processes

2017-10-19 Thread John Dunlap
To piggy back onto this question, what is the best way to do this such that the values of the variables are different for every virtual host? In our model, all virtual hosts shared the same interpreter pool but we need to have different configuration variables on a per virtualhost basis. Currently,

Re: Shared var between processes

2017-10-19 Thread Ben RUBSON
Nice, perfect, just tested, working perfectly ! Thank you very much Adam ! Ben On 19 Oct 2017 18:39, Adam Prime wrote: If it doesn't need to change then you should be able to set it in PerlPostConfigRequire code, and it will then be available to all children in copy on write memory (ie any

Re: Shared var between processes

2017-10-19 Thread Adam Prime
If it doesn't need to change then you should be able to set it in PerlPostConfigRequire code, and it will then be available to all children in copy on write memory (ie any change will only affect the process that changed it.) https://perl.apache.org/docs/2.0/user/handlers/server.html#Startup_F

Shared var between processes

2017-10-19 Thread Ben RUBSON
Hi, I'm trying to share a var between the different processes of my prefork Apache. I then tried the following idea : $r->server()->dir_config('var','val'); Unfortunately, $r->server()->dir_config('var') is not shared among the processes. I would have thought config was stored at the very f