httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nik600 <nik...@gmail.com>
Subject Re: problem with shared memory and directives for httpd
Date Thu, 04 Dec 2014 16:46:28 GMT
because i've tried with both or with only one.

IE, if i use:

module AP_MODULE_DECLARE_DATA kcache_module = {
STANDARD20_MODULE_STUFF,NULL , NULL, create_server_conf, merge_conf,
kcache_directives, register_hooks };

i have the same behaviour


2014-12-04 17:32 GMT+01:00 Eric Johanson <ericj@valmarc.com>:

> Okay but why are you managing the kcache_config structure with both the
> per-directory AND the server-level functions?  You should decide if your
> kcache_config is server-wide or if it is per-directory, and use only the
> appropriate functions.
> -Eric
>
>
> From: nik600 [mailto:nik600@gmail.com]
> Sent: Thursday, December 04, 2014 11:15 AM
> To: modules-dev@httpd.apache.org
> Subject: Re: problem with shared memory and directives for httpd
>
> Hi
>
> thanks for your reply.
>
> i've tried also with a merging function but i have the same behaviour.
>
> Attached the same example with also merge function.
>
> Maybe i'm doing something wrong in my merge function?
>
>
> 2014-12-04 16:33 GMT+01:00 Eric Johanson <ericj@valmarc.com<mailto:
> ericj@valmarc.com>>:
> You have no merge function defined for your server-level config structure
> (kcache_config).  I would definitely try implementing that function.
> Otherwise, when apache goes to combine two levels of the config hierarchy
> together, the resulting combination is likely to just be an empty version
> of kcache_config, which sounds like it could be causing your problem.
>
> -Eric
>
>
> From: nik600 [mailto:nik600@gmail.com<mailto:nik600@gmail.com>]
> Sent: Thursday, December 04, 2014 10:05 AM
> To: modules-dev@httpd.apache.org<mailto:modules-dev@httpd.apache.org>
> Subject: problem with shared memory and directives for httpd
>
> Dear all
>
> i'm experiencing a problem with shared memory and i'm not able to figure
> it out.
>
> i've got a segment of shared memory in my module config and seen that if
> set some settings for the module in my configuration this memory isn't
> available in the request process.
>
> i've also attached an example (very simplified and without any mutex, just
> to show the case).
>
> i've noticed that if i have in my server configuration:
>
>  <IfModule mod_kcache.c>
>       KcacheEnabled On
> </IfModule>
>
> The memory segment is not availabe:
>
> >>[Thu Dec 04 15:26:15 2014] [crit] [client 127.0.0.1]
> kcache_return_result invalid  config->s
>
> But if i comment this directive:
>
>  <IfModule mod_kcache.c>
> #      KcacheEnabled On
> </IfModule>
>
> The memory segment is available and gets updated:
>
> >>[Thu Dec 04 15:24:47 2014] [debug] src/mod_kcache.c(96): [client
> 127.0.0.1] config->s->counter=68
> >>[Thu Dec 04 15:24:48 2014] [debug] src/mod_kcache.c(96): [client
> 127.0.0.1] config->s->counter=69
> >>[Thu Dec 04 15:24:48 2014] [debug] src/mod_kcache.c(96): [client
> 127.0.0.1] config->s->counter=70
> ...
>
> i've attached the full example (100 lines of code)
>
> I'll appreciate any help, thank all in advance
>
> --
> /*************/
> nik600
> http://www.kumbe.it
>
>
>
> --
> /*************/
> nik600
> http://www.kumbe.it
>



-- 
/*************/
nik600
http://www.kumbe.it

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message