why return HTTP 500 when use the require "resty.memcached" in HttpLuaModule module?
monitor.xoyo at gmail.com
Sat Jun 16 13:46:37 UTC 2012
Thank you very much! agentzh.
I use the OpenResty successfully now.
How *powerfully* it is!
and thank you for your sugguestion about LuaJIT.
But i've two problem:
1, how to upgrate the nginx to the latest version, eg: nginx 1.3.1 ?
2, how to add the other third module, eg: nginx_concat_module and
2012/6/16 agentzh <agentzh at gmail.com>
> On Sat, Jun 16, 2012 at 2:44 PM, Xiangong Yang <monitor.xoyo at gmail.com>
> This is really a FAQ for Lua beginners, not specific to ngx_lua. In
> short, you should really use "/usr/local/lib/lua/?.lua" in your
> lua_package_path here instead of "/usr/local/lib/lua/resty/?.lua"
> because you're requiring "resty.memcached" below in your Lua code,
> which will make the Lua VM substitute the "?" part in your search path
> with the string "resty/memcached" rather than "memcached".
> I suggest you just use the ngx_openresty bundle directly. It has all
> the components and search paths properly pre-configured for you :) But
> there's nothing that can stop you from doing all these configurations
> yourself :)
> When you see 500 or empty reply from the server, you should always
> check out your nginx's error.log file for detailed error messages. If
> you do, you'll see from error.log that lua fails to find
> resty.memcached in your search paths.
> BTW, you're recommended to use LuaJIT 2.0 instead of the standard Lua
> 5.1 interpreter with ngx_lua, see:
> Because LuaJIT 2.0 is usually much faster and smaller (in terms of
> memory footprint) and has many less limitations in terms of
> functionalities as compared to the standard Lua 5.1 interpreter.
> Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx