Comments (9)
I seems that it's not related to the configuration. For compiling it with a more verbose output it's a little bit harder. The problem is that this message comes from the go stdlib, otherwise I would be really easy to change it to show the stacktrace. Let me investigate a little bit, it seems the logger can be changed and that might help.
from caddy-cache.
I have two guesses here: the first one is that there is a concurrency issue in the cache code and the other one is that there is another plugin that is conflicting with the cache code. Are you using another plugin aside from the proxy one? It would be really useful if you had the cache status of the response that caused the problem or a stacktrace.
The problem is that caddy works as a chain of middlewares and anyone can keep a reference to the ResponseWriter
and change the status. The cache already checks that to avoid having this problem (https://github.com/nicolasazrak/caddy-cache/blob/master/response.go#L62) but maybe a previous caller in the middleware chain is trying to add another header. I tried to reproduce the issue without luck, that's why I suspect there is something else.
from caddy-cache.
As indicated in the forum post the only other "setting" in use is "proxy".
And for reference the only other plugin compiled in (but not used) is "expires".
If you can give me an indication as to how to compile a more verbose debug output I would give a go...
... currently I compile as follows:
docker run --rm -v $(pwd):/install -e PLUGINS=cache,expires,route53 -e VERSION=0.11.0 abiosoft/caddy:builder
(route53 has been added recently and "multiple response.WriteHeader calls" was seen before adding)
Edit: I'll continue to test other config change impacts - currently testing removal of use of status_header
- I'll report back.
from caddy-cache.
I can confirm that removing status_header
header has no impact - the problem still exists.
I.e. a config file in the following form with multiple "host" sections causes the issue.
example.co.uk,
www.example.co.uk {
cache
proxy / 185.xxx.xxx.xxx {
transparent
}
tls [email protected]
}
example.org,
www.example.org {
cache
proxy / 185.xxx.xxx.xxx {
transparent
}
tls [email protected]
}
http://example.net,
http://www.example.net,
example.com,
www.example.com {
cache
proxy / 91.xxx.xxx.xxx {
transparent
}
tls [email protected]
}
I do I use tls { ask ... }
in one of the config sections currently - however these offending log entries were seen before this was added.
As mentioned previously it would be great if you could give me an indication as to how to compile a more verbose debug output that would aid you.
from caddy-cache.
I'm also having a different issue regarding stuck / stalled requests - which may / may not be related:
https://caddy.community/t/requests-not-completing-stuck-possibly-cache-plugin-issue/4779?u=deanmarktaylor
from caddy-cache.
This is likely to be a race condition. Can you compile it and run it with -race
? I'm going to try to debug it using large files using a range header, maybe that path is problematic.
from caddy-cache.
I'm also having a different issue regarding stuck / stalled requests - which may / may not be related:
https://caddy.community/t/requests-not-completing-stuck-possibly-cache-plugin-issue/4779?u=deanmarktaylor
@DeanMarkTaylor I also found this problem, the reason is here. The reason why the request is not interrupted is that the channel is blocked here. If you want to experience the plugin after the merge, I can compile one for you.
and why not merge it? @nicolasazrak
from caddy-cache.
@DeanMarkTaylor Thanks to the fix that @naiba proposed, I've understood why some request got stuck, it's because of slow readers where breaking the pub/sub mechanism. I've just published the fix. I hope it solves the problem.
from caddy-cache.
I've came back to testing this again, noted another issue - this might be directly related but reported as a separate bug here:
#52
from caddy-cache.
Related Issues (20)
- Add a configuration to not use query params in cache key. HOT 2
- caddy-cache relative cache paths do not respect the root directive HOT 1
- New release? HOT 1
- How to control cached files http header? HOT 5
- How to only cache data with status 200 HOT 2
- Large file request
- http2 Push Dosn't work with cache plugin HOT 1
- RFC 7234: Prefer value from Cache-Control: s-maxage HOT 1
- RFC 5861 Cache-Control Extensions for Stale Content (async cache refresh) HOT 2
- LGPL Licence HOT 6
- Memory leak HOT 4
- Cached file is deleted from /tmp dir HOT 1
- HLS M3U8 Caching HOT 1
- Static website cache HOT 1
- Caddy's import path has changed
- Header modification conflict
- Conflicts with cors plugin HOT 1
- "superfluous response.WriteHeader" and "wrote more than the declared Content-Length" HOT 1
- 'cache' directive not recognized HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from caddy-cache.