Skip to content

Server hang in Database::~Database() #118

@2048khz-gachi-rmx

Description

@2048khz-gachi-rmx

For some reason, queries can get stuck in some kind of limbo, where their status says "running" but they don't finish nor time out for a while
Because MySQLOO joins the runner thread on DB destructor, the server can hang for a really long time
It'd be nice if there was an option to set a query's (or all queries'?) timeout, since a pure Lua solution could have edge cases (ie if a query launches before a map change, Lua won't get a chance to abort it since the hang will already occur)

(I don't know if this is actually it, but it could be the MYSQL_OPT_READ_TIMEOUT and MYSQL_OPT_WRITE_TIMEOUT options?)

gdb of a hanging server's dump:
dump

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions