possible to have worker not accepting requests

33 views
Skip to first unread message

Bjørnar Ness

unread,
Sep 29, 2016, 3:56:18 PM9/29/16
to openresty-en
Is it possible to have a worker process that does not answer http requests, but only works with
blocking stuff in a timer.at loop?

Aapo Talvensaari

unread,
Sep 29, 2016, 6:03:41 PM9/29/16
to openresty-en
On Thursday, 29 September 2016 22:56:18 UTC+3, Bjørnar Ness wrote:
Is it possible to have a worker process that does not answer http requests, but only works with
blocking stuff in a timer.at loop?

Run another instance of OpenResty?

Bjørnar Ness

unread,
Sep 29, 2016, 6:49:06 PM9/29/16
to openresty-en


On Friday, September 30, 2016 at 12:03:41 AM UTC+2, Aapo Talvensaari wrote:

Run another instance of OpenResty?

That was not the question, and I need shm

Robert Paprocki

unread,
Sep 29, 2016, 7:31:42 PM9/29/16
to openre...@googlegroups.com
Then no, it's not available. Can you use memcached or a similar storage engine instead of a shm?

Bjørnar Ness

unread,
Sep 29, 2016, 7:44:29 PM9/29/16
to openresty-en

Yeah.. I can ofcorse, but perhaps look at this as a feature request instead, then: block a worker from
accepting http requests and let it only run init_worker_by_lua_*  agentzh?

Aapo Talvensaari

unread,
Sep 30, 2016, 6:41:47 AM9/30/16
to openresty-en
On Friday, 30 September 2016 02:44:29 UTC+3, Bjørnar Ness wrote:
Yeah.. I can ofcorse, but perhaps look at this as a feature request instead, then: block a worker from
accepting http requests and let it only run init_worker_by_lua_*  agentzh?

I wouldn't wait for this happening anytime soon, or ever. Unless Nginx itself starts supporting something
that allows this. Maybe you should ask on Nginx mailing list about it. Currently workers are configured at
the top level of Nginx configuration.

You can still use another OpenResty with HTTP handlers and SHM and another OpenResty server that
loads SHM data through HTTP or stream from the other.
Reply all
Reply to author
Forward
0 new messages