When the request from the client-side exceeds 30 seconds, the client-side receives 500 Internal Server Error. The funny thing is that the logic on my backside still runs until the end. I have also confirmed that it reaches the return line on the controller method.
I did not configure anything about timeout.
Can anyone help? I am a rookie developer.
I sent a request on both my client-side and and Postman. The postman still got 500 while the spring boot logic was still running.
That is the way it works, if the client timeout is lower than the server timeout, you might get these situations where the client gives up, but the server is still working (and might eventually complete).
The first thing I would check is why the server takes more than 30 seconds to complete, seems quite excessive. If there is no way around that, then you could increase the timeout of your HTTP client to suite the actual execution time of the server. Do note that this is not without risk, as a waiting client is a resource spent, and if you end up setting the timeout too high it might lead to many clients just waiting and resources (mainly threads) being exhausted. Without knowing which HTTP client you are actually using it is impossible to say exactly how to increase the client timeout, but some googling should yield an answer to that. 30 seconds is usually the default timeout.