Maxim Dounin Wrote:
-------------------------------------------------------
> Quick looks suggests that the problem in xtoken module is likely
> here:
>
> https://code.google.com/p/nginx-xtoken-module/source/browse/trunk/ngx_
> http_xtoken_module.c#660
>
> It tries to estimate size of shared memory zone needed to keep
> it's data, but the estimate likely fails on 64-bit platforms due
> to internal structures of slab allocator being bigger on these
> platforms.
Thanks for the tip, Maxim. On line 13 of ngx_http_token_module.c I replaced:
#define XTOKEN_SHM_SIZE (sizeof(ngx_http_xtoken_shctx_t))
with:
#define XTOKEN_SHM_SIZE 65536
and rebuilt. It seems to work fine now.
65536 is purely arbitrary, and obviously not the most efficient use of memory. I'll do some reading and see if I can rework that memory allocation line.
Thanks,
Andrew