Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openresty1.13.6.1 cannot use ngx.shared.dict:free_space() #1785

Closed
huzhewei opened this issue Sep 18, 2020 · 4 comments
Closed

openresty1.13.6.1 cannot use ngx.shared.dict:free_space() #1785

huzhewei opened this issue Sep 18, 2020 · 4 comments

Comments

@huzhewei
Copy link

This place is for bug reports and development discussions only. For general questions and
discussions, please join the openresty-en mailing list instead: https://openresty.org/en/community.html

Ensure you have provided the following details while reporting a problem:

  • The exact version of the related software, including but not limited to the OpenResty version
    (if any), the NGINX core version, the ngx_lua module version,
    and your operating system version.
  • A minimal and standalone test case that others can easily run on their side and
    reproduce the issue you are seeing.
  • Do not simply say "something is broken" or "something does not work". Always provide
    as much details as possible. Always describe the symptoms and your expected results.
  • You can (temporarily) enable the nginx debugging logs to see the internal workings
    of NGINX in your nginx''s error.log file. See http://nginx.org/en/docs/debugging_log.html
    The same instructions apply equally well to OpenResty.
  • If you are seeing crashes, please provide the full backtrace for the crash. See
    https://www.nginx.com/resources/wiki/start/topics/tutorials/debugging/#core-dump
    for more details.

Please, do not use Chinese here. This place is considered English only. If you
really want to use Chinese, please join and post to the openresty (Chinese)
mailing list instead. Please see https://openresty.org/en/community.html Thanks for
your cooperation.

@huzhewei
Copy link
Author

huzhewei commented Sep 18, 2020

My openresty version is 1.13.6.2, but I cannt use ngx.shared.dict:free_space() in it,
while I have seen that it was supported in 1.13.6.1。

error.log:
lua:10: attempt to call method 'free_space' (a nil value)

version:
nginx version: openresty/1.13.6.2
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC)
built with OpenSSL 1.0.1e-fips 11 Feb 2013

@decadence
Copy link

Show the full code. Likely you just call method on the value that is not a dictionary.

@spacewander
Copy link
Member

@huzhewei
Have you called require "resty.core.shdict"as the doc suggests: https://github.com/openresty/lua-nginx-module#ngxshareddictfree_space?
We need a reproducible example, otherwise we can't offer you any help.

@huzhewei
Copy link
Author

thank you @spacewander , it's all my fault !
I think that I didnt read the doc carefully and missed the [ require "resty.core.shdict" ].

Best wishes to you @decadence @spacewander !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants