-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Body size > 8KB are not returned from quarkus + Azure Function application #31871
Comments
/cc @matejvasek (funqy), @patriot1burke (funqy) |
Might be an issue with azure functions itself. |
I pasted the link to the example how to reproduce the issue. The example is based on the quarkus sample project which will be generated with the command described in the official quarkus quide The only method I added was to the resource is to generate a String with a dedicated length an return as a body. @Path("getString")
@GET
public String getString(@QueryParam("times")@DefaultValue("1") Integer times) {
String basicString = "123456789asdfghjkl3245ffffff23t4rg4rt45zrt57h5g4jhg54kk4jj5k4hj3lk45jh4l5hjk4öl5kjl4ö5jk3lö453lkä4lö";
StringBuilder sb = new StringBuilder();
for (int i=0; i<times;i++ ) {
sb.append(basicString);
}
String finalString = sb.toString();
Logger logger = LoggerFactory.getLogger(getClass());
logger.info("Built string with {} chars. bytes: {}",finalString.length(), finalString.getBytes(StandardCharsets.UTF_8).length);
logger.info("java.version: " + System.getProperty("java.version"));
return finalString;
} Which issue could it have? In additional
|
Try setting quarkus.http.limits.max-body-size to something higher. https://quarkus.io/guides/http-reference#http-limits-configuration The default chunk size is 8k....which worries me. But try max-body size first. |
I set the properties to higher values but the issue is still remaining :-(
@patriot1burke Could you reproduce the issue? Do you have any other ideas to fix the issue? |
I'll get back to you later today. I'll need to reproduce and dive in further. |
Does the same behavior occur when |
With But, npw combination here is the summary of my observation:
|
Thanks for the updated information, that's very useful |
I faced this problem. When the issue is fixed, plz mention me. |
we now migrated our Azure function to funqy to avoid the issue. The functionality of funqy seems to be very limited, I don't think that we can use it for production. |
I think @patriot1burke was looking into it |
Description
We are developing an quarkus applications which will run as Azure Function. The project was created according to the description: https://quarkus.io/guides/azure-functions-http .We are using
quarkus-resteasy
to be able to use JAX-RS specification for coding.The application produces response body which can be greater the 8KB, but it is not a problem if the application is started in dev mode with e.g.
mvnw quarkus:dev
. If the application is started with with Azure Functions Core Tools or deployed zu Azure, it do not respond anymore if the request response exceeds the size of 8KB.If
quarkus-undertow
is in additional is added to thepom.xml
file, the application hangs only if the body size exceeds 16KB.The issue does not appear if:
quarkus-funqy-http
is used in the applicationExpected behavior
Bodies greater then 8KB can be returned from quarkus + Azure Function application
Actual behavior
Bodies greater then 8KB can NOT be returned from quarkus + Azure Function application. The application hangs.
How to Reproduce?
I created an example which can be use to reproduce the issue: https://github.com/franden/quarkus-azure-fn-issue-8k-body
This example creates an endpoint which produces a response with a string length depending on the input parameter.
git clone https://github.com/franden/quarkus-azure-fn-issue-8k-body
mvnw clean package azure-functions:run -DskipTests=true -DenableDebug
curl http://localhost:7071/api/hello/getString?times=79 --get -v
The last line will let the application produce and return a string with length of 8295 Bytes.
curl http://localhost:7071/api/hello/getString?times=78 --get -v
will work, because it produces a string with length 8190 BytesOutput of
uname -a
orver
Microsoft Windows [Version 10.0.19045.2604]
Output of
java -version
openjdk version "17.0.2" 2022-01-18
OpenJDK Runtime Environment Temurin-17.0.2+8 (build 17.0.2+8)
OpenJDK 64-Bit Server VM Temurin-17.0.2+8 (build 17.0.2+8, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: