Reputation: 1
I am new to the Reactive Java stuff, in our application we are using Reactive Java with webflux for the restapi. One of our api is taking more than a minute to respond, and after 60 seconds am seeing the 504 gateway timeout in postman. But, I can see that the process(under the API) is being terminated abruptly with the following message. I want my api to continue with processing even after request timing out after 60 secs. Not sure how to do that in reactive java. Also am running the app with docker image with nginx in it.
**Process terminating abruptly with following message**
reactor.Flux.FlowableAs.1 -
| cancel()
**504 gateway timeout response.**
<html>
<head>
<title>504 Gateway Time-out</title>
</head>
<body bgcolor="white">
<center>
<h1>504 Gateway Time-out</h1>
</center>
<hr>
<center>nginx</center>
</body>
</html>
Upvotes: 0
Views: 949
Reputation: 59221
In this case, the Nginx reverse proxy is closing the connection to the WebFlux application.
This closing event is forwarded up the reactive chain as a cancel
event, meaning the processing of the request is being cancelled from the bottom up. This is actually a pretty neat feature since it gives the chance to the application to stop processing things and cleaning up resources properly.
Upvotes: 3