openresty / openresty/lua-resty-redis
Main request hangs with multiple SSI subrequests
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 2k
- Forks
- 447
- Avg merge
- 2h 24m
- Merged PRs (30d)
- 3
Description
Hello,
After reading the issue #23 I have updated my configuration to the following:
https://gist.github.com/frozenminds/5a1f0b9047c7af69ec61
Each SSI request will try to get the content from Redis, if key is not saved in cache yet, it will fallback to a PHP route which will generate the content, save it to Redis and return the output. The second time, Nginx will retrieve the content from Redis because it was cached.
On a page I have 4 SSI calls. The last one hangs on the very first request before the page is also stored in Nginx's FastCgi cache.
<!-- include virtual="/ssi?action=a -->
<!-- include virtual="/ssi?action=b -->
<!-- include virtual="/ssi?action=c&product_id=123 -->
<!-- include virtual="/ssi?action=c&category_id=999 -->
I am aware of this:
http://wiki.nginx.org/HttpLuaModule#Mixing_with_SSI_Not_Supported
But what I do not understand, do I have to completely turn off the SSI module and write my own module that will parse the SSI tags () and then use ngx.location.capture or ngx.location.capture_multi the get the content?
If I do have to parse the SSI tags, do you have any idea where do I start from?
Could you please guide me further?
Thank you in advance!
Boby
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the configuration from the linked gist and reviewing issue #23 plus the documented SSI and Lua-module incompatibility. Trace the four SSI subrequests, including their Redis and PHP fallback paths, and determine whether the hang is reproducible. Done means identifying a supported configuration or clearly documenting that custom SSI handling is required.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, nginx, redis
- Domain
- backend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100