-
Notifications
You must be signed in to change notification settings - Fork 94
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
Unhelpful 'vertx thread blocked' errors in log if openai key is not set #927
Comments
@holly-cummins how are you reproducing this? Asking because I am seeing:
|
Right, that's what I expected to happen, too. :) If I try and do a naive reproducer, I get the right message in the logs, and a relevant stack trace in the browser. Which I guess is reassuring. I've just looked more carefully at my reproducer, and it seems to be adding the micrometer problem that exposes the issue. If I remove micrometer all is well. Even with micrometer, I do see the expected config message in the log, but it's overwhelmed by the vertx stack trace lower down. I do have to wait a few minutes for the vertx trace, but I get this immediately on startup:
Just I've put my reproducer here: https://github.com/holly-cummins/quarkus-langchain4j-podman-ai-instructlab/tree/vertx-timeout-reproducer |
Thanks, I'll have a look on Monday |
Unfortunately I still can't reproduce this :( |
I've just double checked my reproducer. I think this may be something we'd want to fix in Quarkus core (if we want to fix it). But see what you think. This is what I did:
At this point, if I'm paying attention, I do see the expected configuration validation error, along with these two bits of vertx grumbling:
But if I don't notice that, and instead go to http://localhost:8080/, nothing happens for a while, and then I get 3958 lines of vertx |
Ah, now I see what you mean. I am not really sure what we could do here TBH |
Yeah, the two fixes that come to mind are "tactically suppress the error before it hits the logs," or "rewrite the whole vertx error handling model in Quarkus core so that it doesn't spam the logs in this scenario." The first seems quick but risky, because we could suppress good stuff, and the second seems slow but risky, because it's a fundamental architectural change. It might have broader benefits, though, because I don't think anyone wants ~4k lines of stack trace in their log from one simple error. Some similarity matching on the exceptions, followed by a 'we saw this same exception 200 more times', might be friendly. @cescoffier, do you have any thoughts? |
You cannot implement the second - that won't work. Now, what is blocking when the API key is not provided? The fact we block on a lock means that something somewhere is holding the lock and "forgot" to release it after the exception is thrown. That's where I would look first. |
If I run a simple application such as https://github.com/kdubois/quarkus-langchain4j-podman-ai-instructlab, but with the default openai base url and no
export QUARKUS_LANGCHAIN4J_OPENAI_API_KEY=...
, I get the following errors in the logs:It's not obvious that the root cause is missing configuration. I see this with 0.17.2 and 0.18.
The text was updated successfully, but these errors were encountered: