Giter Site home page Giter Site logo

Comments (14)

agentzh avatar agentzh commented on September 23, 2024

We cannot reproduce this on our side. Could you please provide more information regarding your OS name, OS version, nginx version, ngx_lua's version, luarocks' version, and etc. Thank you.

from lua-nginx-module.

outrace avatar outrace commented on September 23, 2024

I can reproduce this in my side.
If change the test.lua to:

--test.lua
require("XXX") ---not local xxx = require("XXX")

that will work fine.

luajit2.0-bata6
ubuntu 10.04
nginx 8.54
ngx_lua 0.16rc3

from lua-nginx-module.

outrace avatar outrace commented on September 23, 2024

我再用中文说一次吧。
就是当调用一个module的时候
使用
local mdl = require("Mdl") 就会出错,返回200,但是是空白。
直接require("Mdl") 的话。就可以调用到 Mdl这个模块

所以顺便请教一下,如何进行调试啊?错误信息既不再页面显示,也不再nginx的error log里。
我现在只能模拟ngx的变量,然后用命令行 luajit filename.lua 来debug,挺痛苦的。

from lua-nginx-module.

agentzh avatar agentzh commented on September 23, 2024

Regarding debugging, use lua's print function will emit outputs to error.log at the notice log level. Also, there's ngx.log() function that you can use to debug your Lua code. To send error messages to the web page output, just use pcall at the top level of your lua script, and ngx.print() it out to the response body.

from lua-nginx-module.

golgote avatar golgote commented on September 23, 2024

I have had the same problem when I used luarocks, there was a stack overflow. This was with cache off, I didn't test with cache on.

I think it's because Luarocks might do something to the "require" function that the Lua Nginx module doesn't like.
I will try to test with the latest versions of every components and report.

from lua-nginx-module.

agentzh avatar agentzh commented on September 23, 2024

On Wed, Jun 22, 2011 at 6:09 PM, golgote
[email protected]
wrote:

I think it's because Luarocks might do something to the "require" function that the Lua Nginx module doesn't like.
I will try to test with the latest versions of every components and report.

Great! Looking forward to your results :D

To be honest, we haven't used luarocks in our apps yet.

Thanks!
-agentzh

from lua-nginx-module.

golgote avatar golgote commented on September 23, 2024

Hi Agentzh,
I tested with latest LuaRocks 2.0.4.1, nginx 1.0.4 and today's snapshot of Lua-nginx-module and the problem is still here (although I now find the error log much better looking, thank you :) )

2011/06/29 20:31:39 [error] 12547#0: *8 lua handler aborted: runtime error: /usr/local/share/lua/5.1/luarocks/path.lua:244: stack overflow, client: 123.456.789.123, server: example.com, request: "GET /info.lua HTTP/1.1", host: "example.com"

Hope this helps, don't hesitate to ask for more info if you need.
Thanks.

from lua-nginx-module.

agentzh avatar agentzh commented on September 23, 2024

On Thu, Jun 30, 2011 at 2:38 AM, golgote
[email protected]
wrote:

Hi Agentzh,
I tested with latest LuaRocks 2.0.4.1, nginx 1.0.4 and today's snapshot of Lua-nginx-module and the problem is still here (although I now find the error log much better looking, thank you :) )

2011/06/29 20:31:39 [error] 12547#0: *8 lua handler aborted: runtime error: /usr/local/share/lua/5.1/luarocks/path.lua:244: stack overflow, client: 123.456.789.123, server: example.com, request: "GET /info.lua HTTP/1.1", host: "example.com"

Thanks for the info. We'll look into this in the near future :)

Thanks!
-agentzh

from lua-nginx-module.

agentzh avatar agentzh commented on September 23, 2024

I looked into this today, and could not reproduce this with the latest version of LuaRocks (2.0.4.1) and ngx_lua (v0.2.1rc3), on either Linux or Mac OS X. Here records my experiences:

http://openresty.org/#UsingLuaRocks

Please tell us if it works for you too or if I'm doing something different from you :)

from lua-nginx-module.

agentzh avatar agentzh commented on September 23, 2024

Okay...I've reproduced this problem by disabling lua_code_cache.

from lua-nginx-module.

agentzh avatar agentzh commented on September 23, 2024

I think I've already fixed this issue in git master, could you please try it out on your side? Thanks!

from lua-nginx-module.

agentzh avatar agentzh commented on September 23, 2024

consider it resolved.

from lua-nginx-module.

golgote avatar golgote commented on September 23, 2024

Hi Agentzh, I cannot test right now, but I'll let you know if I find any other issues related as soon as I can.
Thanks for the fix.

from lua-nginx-module.

agentzh avatar agentzh commented on September 23, 2024

On Thu, Aug 11, 2011 at 7:27 PM, golgote
[email protected]
wrote:

Hi Agentzh, I cannot test right now, but I'll let you know if I find any other issues related as soon as I can.
Thanks for the fix.

Looking forward to your results ;)

Best,
-agentzh

from lua-nginx-module.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.