hi,agentzh
sorry for my delay.
On Wednesday, July 10, 2013 3:05:30 AM UTC+8, agentzh wrote:
> Hello!
>
>
>
> On Tue, Jul 9, 2013 at 3:07 AM, jijilu wrote:
>
> >
>
> > local pr_xml = xml.eval(prdata); this line will be wrong to echo server 500 error.
>
> >
>
>
>
> I didn't see how you initialize the "xml" Lua variable here.
>
>
>
> > but turn lua_code_cache off, the same error is gone.
>
> >
>
>
>
> That usually means you didn't "require" the Lua module in the right
>
> way. The correct syntax for loading a Lua module is
>
>
>
> local foo = require "foo"
>
>
>
> rather than just
>
>
>
> require "foo"
>
>
>
> BTW, English posts are better for the openresty-en mailing list:
>
> https://groups.google.com/group/openresty-en
>
>
>
> Best regards,
>
> -agentzh
After turn lua_code_cache on,
local xml = require("LuaXml");
local uri = "";
local res = ngx.location.capture(uri);
if res.status == 200 then
local pr_xml = xml.eval(prdata);
local xscene = pr_xml:find("DomesticFlightRoute");
local rcs = tonumber(xscene[1][1]);
rcs will be nil when system load in case of high concurrent rate.