runtime icon indicating copy to clipboard operation
runtime copied to clipboard

[HTTP]On transport type synchronous error after 3 minutes on slow external endpoint

Open Hooghof opened this issue 1 year ago • 1 comments

Test case on next

  • An external endpoint on the Postman mock server is configured with a response delay of 180 seconds
  • A synchronous flow calls the external endpoint
  • During 10 minutes, you see 4 pending exchanges
  • After 3 minutes, all pending exchanges are gone, 4 failed exchanges displayed.
  • Last failed exchange has timestamp of last exchange
  • Error message is available in the flow log:
Failed delivery for (MessageId: 8848B7D643E82E3-0000000000015BBE on ExchangeId: 8848B7D643E82E3-0000000000015BBE). Exhausted after delivery attempt: 1 caught: java.net.SocketTimeoutException: Read timed out. Processed by failure processor: FatalFallbackErrorHandler[Channel[setExchangePattern224]] Message History --------------------------------------------------------------------------------------------------------------------------------------- Source ID Processor Elapsed (ms) route:2 ID_6675632837bb2e000e0000f6-5d from[jetty:https://0.0.0.0:9001/1/HttpTimeOut?http 180316 route:3 ID_6675632837bb2e000e0000f6-5d step 0 route:4 ID_6675632837bb2e000e0000f6-5d mock:x 0 route:5 ID_6675632837bb2e000e0000f6-5d removeHeaders[CamelHttp*] 0 route:6 ID_6675632837bb2e000e0000f6-5d direct:ID_6675632837bb2e000e0000f6_test_5d0f9f3d-9 0 route:3 ID_6675632837bb2e000e0000f6-7d step 0 route:4 ID_6675632837bb2e000e0000f6-7d mock:x 0 route:5 ID_6675632837bb2e000e0000f6-7d removeHeaders[*] 0 route:6 ID_6675632837bb2e000e0000f6-7d direct:ID_6675632837bb2e000e0000f6_test_7deb398f-4 0 route:3 ID_6675632837bb2e000e0000f6-d7 step 0 route:4 ID_6675632837bb2e000e0000f6-d7 mock:x 0 route:5 ID_6675632837bb2e000e0000f6-d7 setHeader[CONTENT_TYPE] 0 route:8 ID_6675632837bb2e000e0000f6-d7 direct:ID_6675632837bb2e000e0000f6_test_d7cfce16-d 0 route:3 ID_6675632837bb2e000e0000f6-6c step 0 route:4 ID_6675632837bb2e000e0000f6-6c mock:x 0 route:5 ID_6675632837bb2e000e0000f6-6c setHeader[CamelHttpQuery] 0 route:8 ID_6675632837bb2e000e0000f6-6c setHeader[CamelHttpMethod] 0 route:11 ID_6675632837bb2e000e0000f6-6c setHeader[user-agent] 0 route:14 ID_6675632837bb2e000e0000f6-6c setProperty[useCustomDateHeader] 0 route:17 ID_6675632837bb2e000e0000f6-6c https://91037a8f-4827-4de1-882e-460017a70235.mock. 0 route:5 onException294/setExchangePatt setExchangePattern[InOnly] 0 Exchange --------------------------------------------------------------------------------------------------------------------------------------- Exchange[ Id 8848B7D643E82E3-0000000000015BBE Headers {breadcrumbId=8848B7D643E82E3-0000000000015BBE, CamelHttpMethod=GET, CamelHttpQuery=test=123, CamelRedelivered=false, CamelRedeliveryCounter=0, ComponentInitTime=1718974999261, CONTENT_TYPE=text/plain, user-agent=Dovetail/4.17.0-SNAPSHOT} BodyType org.apache.camel.converter.stream.InputStreamCache Body ] Stacktrace ---------------------------------------------------------------------------------------------------------------------------------------

Tenant: Microscope Flow: HttpTimeOut

Test case on acceptance

  • An external endpoint on the Postman mock server is configured with a response delay of 180 seconds
  • A synchronous flow calls the external endpoint
  • During 3 minutes, you see 4 pending exchanges
  • After 3 minutes, all pending exchanges are gone, there are 5 completed exchanges displayed.
  • Last completed exchange has timestamp of last exchange

Tenant: Dovetail Flow: HttpTimeOut

Hooghof avatar Jun 21 '24 12:06 Hooghof

Investigate how to set the timeouts (seconds / milliseconds / minutes). How to set all timeouts at once.

skin27 avatar Jul 01 '24 08:07 skin27

Test on next

The time between the first and the last exchange is expected to be 3 minutes.

Image

Image

Test on acceptance*

Image

Image

Hooghof avatar Jul 23 '24 07:07 Hooghof

I changed the test. If the socket timeout is larger than the delay on the requested api, the response is right. If the socket response is shorter than the delay on the api, the response results in an error. So, it works as expected.

Hooghof avatar Aug 07 '24 12:08 Hooghof