0

I have an spring boot application that is deployed on a tomcat 8 webserver running on a CentOS machine that uses a MSSQL 13.0.5026.0 db on a windows server 2016. I have a simple REST controller that produces a response to a request. I can see from logs that backend produces a 200 response after finishing the request task.

The problem is that frontend never receives the response. It remains in pending.

network tab in chrome devtools

Tomcat log

Controller code

It's a problem I have been experiencing in production only recently on a codebase that didn't change lately. The same app worked normally until lately so I dont't believe it's an issue with spring it self but rather with tomcat, catalina, network, DB or other actors that could contribute to the problem

I checked the DB for eventual deadlocks or pending transactions that didn't finish appropriatelly and I found no issues.

I tried restarting the tomcat service and the DB service but unfortunatelly the problem continued to persist.

The response produced is a simple string message so I don't believe that a network problem due to response size is an issue.

Do you have any experience with similar problems? What could produce such a result?

Thank you

S. Ilic
  • 11
  • 1
  • 3
  • Your best bet is to debug, if you can't just add a breakpoint in your production system, at least add some comments so you can find the bottleneck! By the way, I saw your comment and found out on your profile that we went to the same university :) – G. Ciardini Dec 07 '22 at 10:39
  • Oh. We could have been classmates :) Anyway I already tried putting intermediate log messages to see if it gets stuck somewhere but it does everything as expected. The last log message is the one I posted in the screenshot and it should be the one that closes the request. – S. Ilic Dec 07 '22 at 11:06
  • Can you please share code written on frontend side for calling api? – Rohit Agarwal Dec 07 '22 at 17:31
  • Did you specify the type of result you except? (example, txt, json, xml etc..) – G. Ciardini Dec 08 '22 at 13:44

0 Answers0