-
-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undertow adapter error in logs #444
Comments
@danielsz Hi Daniel, It'd be helpful to have some more context - incl.:
From the error, it sounds like Undertow might be encountering a keyword as a Ring response (i.e. rather than the usual Ring response map, etc.). Is it possible you have middleware or some other handler that could unexpectedly return a keyword? |
Thank you, Peter. I'll investigate and report back asap. |
Hi Peter, I finally have more information to report. Sorry about the wait.
Is this starting to make sense? Please feel free to instruct me further. |
Hi Daniel, thanks for the extra info (and debugging!). Could it be that the Undertow adapter expects this value to be a standard Ring response (e.g. map)? I'm not sure why the default is a keyword, but it could be the intention was for that to be replaced (either in config, or by middleware, etc.)? If so, that's definitely unclear - sorry about that! If you can confirm that this is the source of your error, I'll dig into this a bit more next time I'm on batched Sente work. Will need to check the Undertow source/docs. If this does indeed need to be a proper Ring response, we can warn about that at the time the adapter is built. |
A fix is coming. Yes, since we're not the author, second guessing is the best we can do. After carefully reading the source code of both the Undertow community adapter for Sente and the Ring adapter for which it was written, my interpretation is that we're dealing with an abstraction leak. You see, a Clojure promise was chosen to back up Sente's ajax channel, the code path taken when
A 2-arity version of This is the best of my understanding at this point. I could be wrong in so many ways (as always). However, I have uploaded a patched version on my production server in order to test my assumptions. If the logs remain clean over time, I would be able to submit a PR with increased confidence. Please let me know if that's all right with you. Thank you! |
The fix has run on my production servers for a couple of days. No more errors. When a timeout occurs on
Returning |
@danielsz Hi Daniel, thanks for the investigation on this - and for reporting back your findings. PR very welcome, thanks! 🙏 |
- Removed ajax-resp-timeout-val option as it should not be a user-defined value. See taoensso#444 for context.
Merging #445 in a moment, closing 👍 Thanks again for the report and fix! |
Hi,
I am seeing the following error in my logs. It props up consistently, but I haven't figured out yet what causes it. It doesn't seem to be related to application code. That's what I take away from the stack trace.
The Ring adapter for the Undertow web server in my
deps.edn
isluminus/ring-undertow-adapter
.The text was updated successfully, but these errors were encountered: