Skip to content

no request found #272

Open
Open
@ajayNegiCodes

Description

@ajayNegiCodes

This code being executed from the context of init_by_lua_file is giving the below error:

local red = redis:new()

Looking at this - https://github.com/openresty/lua-resty-redis#limitations

It says:

This library cannot be used in code contexts like init_by_lua*, set_by_lua*, 
log_by_lua*, and header_filter_by_lua* where the ngx_lua cosocket API is not available.

I want to execute a lua script when the nginx server starts. And usually that's done through init_by_lua_block/init_by_lua_file directives. How can I achieve that purpose here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions