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

The connect function is thrown incorrectly #139

Open
give-it-a-try-1 opened this issue Nov 8, 2022 · 0 comments
Open

The connect function is thrown incorrectly #139

give-it-a-try-1 opened this issue Nov 8, 2022 · 0 comments

Comments

@give-it-a-try-1
Copy link

When my mysql uses the connect function, it keeps throwing errors, which has cost us two weeks!! I hope someone can help me

Error: lua entry thread aborted: runtime error: attempt to yield across C-call boundary

There is no problem with mysqlConfig

local mysqlConfig = {
    host = "127.0.0.1",
    port = 3306,
    database = "win_mutil_web",
    user = "root",
    -- password = "ql532624.",
    password = "123456",
}
local db, err = mysql:new()
if not db then
    ngx.log(ngx.ERR, "failed to instantiate mysql: ", err)
    return nil
end
-- 1 sec
db:set_timeout(1000)
local ok, err, errcode, sqlstate = db:connect(mysqlConfig)

If I execute connect, I'm going to throw an error

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

1 participant