Hi Nirali Shah,
The 499 error is a client-side problem, which means the client is the one closing the connection prematurely before the server could complete the response or the server is not receiving the entire body of the request sent by webhook before the connection is closed.
If your Azure Function is taking a long time to complete, you can increase the functionTimeout setting in the host.json file.
- Consumption Plan: Up to 5 minutes by default, extendable to 10 minutes.
host.json:
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[4.*, 5.0.0)"
},
"functionTimeout":"00:10:00"
}
I have tested with below code and it worked:
Http Starter:
import inspect
import json
import logging
import azure.durable_functions as df
import azure.functions as func
applogger = logging.getLogger("azure.functions")
LOGS_STARTS_WITH = "LOG_PREFIX"
def get_data_from_request_body(request):
"""Get data from request body.
Args:
request (func.HttpRequest): Azure function HttpRequest class object
"""
__method_name = inspect.currentframe().f_code.co_name
try:
data = request.get_json()
json_data = json.dumps(data)
return json_data
except ValueError as value_error:
applogger.error("{}(method={}) {}".format(LOGS_STARTS_WITH, __method_name, value_error))
except Exception as err:
applogger.error("{}(method={}) {}".format(LOGS_STARTS_WITH, __method_name, err))
async def main(req: func.HttpRequest, starter: str) -> func.HttpResponse:
"""
Start the execution.
Args:
req (func.HttpRequest): To get data from request body pushed by webhook
Returns:
func.HttpResponse: Status of Http request process (successful/failed).
"""
__method_name = inspect.currentframe().f_code.co_name
try:
applogger.debug("{} HttpStarter Function Called.".format(LOGS_STARTS_WITH))
data = get_data_from_request_body(req)
if data:
client = df.DurableOrchestrationClient(starter)
instance_id = await client.start_new(
req.route_params["functionName"], client_input=data
)
applogger.info(
"{} Started orchestration with ID = '{}'.".format(
LOGS_STARTS_WITH, instance_id
)
)
body = "Data Received successfully via Webhook."
return func.HttpResponse(
body=body,
status_code=200,
headers={"Content-Length": str(len(body))},
)
else:
applogger.info("{}(method={}) No required data found.".format(LOGS_STARTS_WITH, __method_name))
body = "No required data found."
return func.HttpResponse(
body=body,
status_code=202,
headers={"Content-Length": str(len(body))},
)
except Exception as err:
body = "Error: {}".format(err)
return func.HttpResponse(
body=body,
status_code=400,
headers={"Content-Length": str(len(body))},
)
Orchestrator Function:
import logging
import json
from azure.durable_functions import DurableOrchestrationContext, Orchestrator
def orchestrator_function(context: DurableOrchestrationContext):
result1 = yield context.call_activity('Hello', "Tokyo")
result2 = yield context.call_activity('Hello', "Seattle")
result3 = yield context.call_activity('Hello', "London")
return [result1, result2, result3]
main = Orchestrator.create(orchestrator_function)
Activity Function(Hello):
import logging
def main(name: str) -> str:
return f"Hello {name}!"
Able to run the function in portal:
Sample Payload:
{
"event": "webhook_event",
"data": {
"id": 12345,
"name": "Sample Event",
"timestamp": "2025-04-02T12:34:56Z",
"details": "Some detailed information about the event"
}
}


Hope this helps.
If you have any other questions, please let me know. We will be glad to assist you with the further resolution.
Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.