@patrick @Teodor , I need your help.
I have built a robust and scalable system in Wappler for the financial sector, where we manage transactions, receivables, and banking integrations. However, we are facing a critical issue that affects the reliability of the application.
The Problem
When a request is made to our API in Wappler to create a transaction, the process works as follows:
- Our API receives the request and processes the data.
- The API formats and forwards the request to the bank.
- The bank returns a response – which sometimes takes up to 3 seconds.
- Here’s the issue: Our API, with a timeout set to 10000ms, does not recognize the response in some cases and retries the request, causing duplicate transactions and failures.
Upon checking the logs, I found that the transactions were successfully created in the bank, but Wappler either does not receive or does not interpret the response within the expected time, which suggests a bottleneck.
What We Have Already Tested
- Checked the banking API: The service is stable, with no downtime or abnormal delays.
- Tried different timeout settings: Even with
10000ms
, Wappler sometimes ignores the response and retries the request. - Other integrated systems do not have this issue: This unexpected behavior only occurs within Wappler.
- The bank’s response headers include
connection: keep-alive
, indicating that connections can be reused.
Example of Bank API Response Headers
Here are the response headers from the banking API to our Wappler application:
{
"date": "Wed, 29 Jan 2025 00:33:10 GMT",
"content-type": "application/json; charset=utf-8",
"content-length": "3076",
"connection": "keep-alive",
"x-envoy-upstream-service-time": "650",
"x-amzn-requestid": "7608ae22-4544-4244-b655-8d13e071ed0f",
"x-amzn-trace-id": "Root=1-67997745-1d64c1b324ea491656107128",
"set-cookie": [
"az_asm=F1tvVGlw8EyAURsfigR/GkuQKV9OB4p+3Kb9gSwwyXF+P0q9owVn3PpDGbESNfEoWCzGJOXCFfBRy8Dt; Secure; HttpOnly; SameSite=Lax",
"az_botm=136943fa7d5676e2c7fdd3ce748773c6; Secure; HttpOnly; SameSite=Lax"
]
}
Note: The cookies are not required for future requests, so we can rule out any dependency on them.
What We Need to Know
- Does Wappler have any limitations in processing asynchronous responses beyond a certain time threshold?
- Is there an internal automatic retry mechanism that could be causing these unnecessary retries?
- Are there any specific configurations to improve connection stability and ensure that the banking API response is correctly recognized?
- Could Wappler be closing the connection before receiving the response? Even though
keep-alive
is enabled, this might still be an issue.
I have been working on this for three months without a successful resolution. I really need your help to understand if something within Wappler is causing this behavior. I have traces and detailed logs that I can share if needed.
I look forward to your response and truly appreciate any guidance you can provide!