5

In Kibana of our application, I keep seeing this line of log from org.springframework.web.reactive.function.client.ExchangeFunctions:

[2f5e234b] Cancel signal (to close connection)

The thread is reactor-http-epoll-1 or so.

It could happen in two situations:

  • when the connection is successful and returns a response, then it does not matter
  • when for some unknown cause, after 10 seconds, the connection does not return anything, and this line also happens, and period, nothing more. It seems to be a timeout but I am not sure(because the default timeout in my WebClient config is 10s)

What could be the cause of this? Client active drop or server active refusal?

Is the 2nd case a timeout? But not TimeoutException() is thrown afterwards.

I now do a doOnCancel() logging in WebClient to deal with the 2nd case, but then I notice there is case 1, and this doOnCancel() handling does not make sense anymore, because it seems to happen in all cases.

Claudio Tasso
  • 417
  • 5
  • 13
WesternGun
  • 11,303
  • 6
  • 88
  • 157
  • Did you have an explanation? because I have the same log... – Zrom Nov 02 '20 at 16:36
  • Not yet, ticket in stand-by status in our backlog. I think it is client closing connection, because it happens either way. – WesternGun Nov 02 '20 at 17:12
  • found anything new? got the same issue after 60s, what's really strange is that I cannot reproduce this issue locally, it only happens inside a k8s pod – fnurglewitz Feb 02 '21 at 11:12
  • I think it is client closing the connection when getting data before timeout, or just when times out. For example for my webclient in Spring Boot, the default timeout is 5 seconds, and logs shows that the cancel signal happens after at most 5 sec. – WesternGun Feb 02 '21 at 22:20
  • Did you manage to solve this issue ? – angus Apr 07 '21 at 20:57
  • @angus as I said, no. We now ignore it, but suspect that it is the client(we ourselves) closing it, not the server, due to the timeout client config. – WesternGun Apr 08 '21 at 06:19

1 Answers1

0

I have the same log. But in my WebClient i returned Mono.empty() and the method signature was Mono< Void>. After changing to Mono< String> the problem was gone.

Vladislav
  • 21
  • 3