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

关于调试sql #8

Closed
wxianfeng opened this issue Jun 19, 2013 · 2 comments
Closed

关于调试sql #8

wxianfeng opened this issue Jun 19, 2013 · 2 comments

Comments

@wxianfeng
Copy link

我是用 lua-resty-mysql 从mysql取数据, 每次改sql 都需要重新reload,比较麻烦, 請問有什么配置可以不需要reload吗。

@agentzh
Copy link
Member

agentzh commented Jun 19, 2013

I've already replied to you on the openresty mailing list. Please note that this ticket board is English only. Also, when you say something does not work, you should always provide more details like the configuration and code that you use.

@wxianfeng
Copy link
Author

谢谢 春哥
已经搞定, 需要写在外部文件

下文是 @agentzh 在mail list 中的回复:

你需要把 Lua 代码放在外部文件中,这样在 lua_code_cache off 时才不需要 reload nginx.

如果你直接把 Lua 代码内联在 nginx.conf 配置文件中,则必须 reload nginx 才能生效,毕竟只有 nginx
知道如何重新加载它自己的配置文件。这一点在 ngx_lua 官方文档的 lua_code_cache 一节中有详细的说明:

http://wiki.nginx.org/HttpLuaModule#lua_code_cache

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

2 participants