Open amamounelsayed opened 4 years ago
The issue that grp-java is overwhelmed by the number of the requests which cause the crash. Still investigating if the cause from host or from the java.
@FunctionName("HttpTrigger-Java")
public HttpResponseMessage run(
@HttpTrigger(name = "req", methods = {HttpMethod.GET, HttpMethod.POST}, authLevel = AuthorizationLevel.ANONYMOUS) HttpRequestMessage<Optional
// get("https://httpstat.us/200");
// Parse query parameter
String query = request.getQueryParameters().get("name");
String name = request.getBody().orElse(query);
for(int i=0; i<1000000; i++) {
context.getLogger().fine("Java HTTP trigger processed a request");
}
context.getLogger().info("Java HTTP trigger processed a request. 2");
if (name == null) {
return request.createResponseBuilder(HttpStatus.BAD_REQUEST).body("Please pass a name on the query string or in the request body").build();
} else {
return request.createResponseBuilder(HttpStatus.OK).body("Hello, " + name).build();
}
}
Any updates on this. I am also facing this error when running azure functions
Any updates
Thank you for your message, we implemented new feature for better logging, instead of using the context logging. https://github.com/Azure/azure-functions-java-worker/wiki/Distributed-Tracing-for-Java-Azure-Functions https://docs.microsoft.com/en-us/azure/azure-monitor/app/monitor-functions
The worker randomly restart using the blobInput httptrigger and bloboutput. The httptrigger uses header not body.