Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Log spam on shared dictionary eviction #163
I'm using several lua_shared_dicts which work fine as LRU caches, but seem to log "ngx_slab_alloc() failed: no memory in lua_shared_dict" errors to the nginx error.log on eviction. It would be nice if the shared dictionaries didn't cause errors when operating normally as those errors may mask real problems that need investigating.
This problem was seen using simpl-ngx_devel_kit-v0.2.17-0-gbc97eea and chaoslawful-lua-nginx-module-v0.5.0rc28-0-g7a7ac79.
The error is generated in nginx core, so ngx_lua cannot stop it from logging. If you have expire times set then you can do something like this:
And it will flush the expired entries. This use case was the reason I suggested flush_expired.