Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 12365662B for ; Mon, 20 Jun 2011 20:29:43 +0000 (UTC) Received: (qmail 45580 invoked by uid 500); 20 Jun 2011 20:29:42 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 45546 invoked by uid 500); 20 Jun 2011 20:29:42 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 45538 invoked by uid 99); 20 Jun 2011 20:29:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jun 2011 20:29:42 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of neil.mckee@inmon.com designates 74.125.83.173 as permitted sender) Received: from [74.125.83.173] (HELO mail-pv0-f173.google.com) (74.125.83.173) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jun 2011 20:29:36 +0000 Received: by pvg3 with SMTP id 3so3506843pvg.18 for ; Mon, 20 Jun 2011 13:29:16 -0700 (PDT) Received: by 10.68.41.163 with SMTP id g3mr2174302pbl.431.1308601755868; Mon, 20 Jun 2011 13:29:15 -0700 (PDT) Received: from [10.0.0.72] ([38.99.24.226]) by mx.google.com with ESMTPS id m9sm3253473pbd.39.2011.06.20.13.29.14 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 20 Jun 2011 13:29:15 -0700 (PDT) Subject: Re: Module External Configuration Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Neil McKee In-Reply-To: Date: Mon, 20 Jun 2011 13:29:13 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <4330EAB7-1E2D-44C8-B8B6-9312843B03FC@inmon.com> References: To: modules-dev@httpd.apache.org X-Mailer: Apple Mail (2.1084) In the mod-sflow implementation I have one thread responsible for = reading in new configuration as it changes and writing it to a = shared-memory area where the worker-processes/threads can pick it up = whenever it changes. I don't know if that is the best way or not, but = it's one data point for you. Source code is here: http://mod-sflow.googlecode.com Neil On Jun 20, 2011, at 11:39 AM, Jason Funk wrote: > Hello, >=20 > The module that I am writing has an external configuration file that = it > parses and loads into configuration when the server loads. Before = every > request it checks to see if the configuration file has been updated = and if > it has it reloads the configuration. The configuration should be = shared over > the entire server. The problem I am running into is that after the > configuration file is updated the new configuration gets reloaded and = stored > in memory but after a little while, the configuration reverts back to = it's > previous version. I assume that this is because a new process was = spawned to > handle a new request and the updated memory didn't get carried over = (even > though the pointer address didn't change...) >=20 > My question is this: What mechanism should I be using in order to > store persistent, mutable, configuration data that is shared between = every > child process? >=20 >=20 > Jason