How to troubleshoot slow running requests in microservices

Troubleshooting high CPU usage in Java environments
Understand how long ColdFusion requests are taking to execute

How to troubleshoot slow running requests in microservices 

we are running 3 microservices and for this use case, we have an issue with a long-running request.   We will then take a look at FusionReactor and see how it picks up this issue. For the test environment, we are using Redhat Microservices, SpringBoot, and Eclipse in conjunction with FusionReactor.

Java, Spring Boot and Red Hat OpenShift troubleshooting with FusionReactor

Video by Pierre-Hugues Charbonneau

How to detect your microservices

Microservices are automatically detected when you use FusionReactor Cloud. FusionReactor tells us that one of our requests had taken over 24 seconds, clearly, we need to understand why it took so long. FusionReactor gives us 2 options:

  • To view the trace; which allows us to see the sub-transactions
  • To profile the transaction; which gives us a code-level view
How to troubleshoot slow running requests in microservices, FusionReactor

Use traces to troubleshoot microservices

FusionReactor is an ideal tool to troubleshoot slow-running requests in microservices. It stores 90 days of historic data, so if a call crashes your pod then you can go back in time to see why this happened.

How to troubleshoot slow running requests in microservices, FusionReactor

Troubleshoot microservices using a profiler

A profiler will tell you what actually happened in the code. Consequently, it will tell you exactly where time was spent. The code gives us the rest template where we can see that a great deal of time was spent on the socket rewrite. This is because it is waiting for a remote service; so we have got to the route cause of the issue.

How to troubleshoot slow running requests in microservices, FusionReactor

How to troubleshoot slow running requests in microservices

With the increased adoption of microservices, complex typographies are becoming increasingly the norm. FusionReactor allows you to see the transaction, the trace, and even the actual code giving you a complete view of the issue.