You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am encountering an issue while using lapis.db.query in an OpenResty environment with Lua 5.1. When executing a simple SQL query via lapis.db.query, the following error occurs:
2024/08/24 13:18:11 [error] 4349#4349: *1 lua entry thread aborted: runtime error: attempt to yield across C-call boundary
stack traceback:
coroutine 0:
[C]: infunction'require'
/usr/local/share/lua/5.1/lapis/init.lua:15: infunction'serve'
content_by_lua(nginx.conf.compiled:22):2: in main chunk, client: 127.0.0.1, server: , request: "GET / HTTP/1.1", host: "127.0.0.1:8080"
Here is a minimal example of my code:
localdb=require("lapis.db")
functionmodel.loadModules()
localresult=db.query("SELECT * FROM modules WHERE active = 1")
error("ok")
-- Further processingend
The error occurs immediately after executing the SQL query, even before reaching the error("ok") statement.
I am confident that the issue is related to the execution of the SQL query, as the error disappears when I comment out the db.query call.
Environment:
OpenResty
Lua 5.1 (Tested with Lua5.2, Lua5.3, Lua5.4, LuaJit)
Note:
All dependencies are up to date. I have not modified the default configuration of Lapis (only for addin my DB, like this : mysql = {host = "127.0.0.1", user = "bob", password = "bob", database = "prod_website"}
The text was updated successfully, but these errors were encountered:
iThorgrim
changed the title
Database request error Attempt to yield across C-call boundary
Database request error : "Attempt to yield across C-call boundary"
Aug 24, 2024
Hello,
I am encountering an issue while using lapis.db.query in an OpenResty environment with Lua 5.1. When executing a simple SQL query via lapis.db.query, the following error occurs:
Here is a minimal example of my code:
The error occurs immediately after executing the SQL query, even before reaching the
error("ok")
statement.I am confident that the issue is related to the execution of the SQL query, as the error disappears when I comment out the
db.query
call.Environment:
Note:
All dependencies are up to date. I have not modified the default configuration of Lapis (only for addin my DB, like this :
mysql = {host = "127.0.0.1", user = "bob", password = "bob", database = "prod_website"}
The text was updated successfully, but these errors were encountered: