All multi-threaded applications are prone to Deadlock. Modern Scala platform is no exception. In this series of simulating and troubleshooting performance problems in Scala, let’s discuss how to simulate a Deadlock in Scala and how you can troubleshoot it. What is Deadlock? First let's try to understand what 'Deadlock' means. Several technical definitions aren’t clear.... Continue Reading →
Simulating & troubleshooting CPU spike in Scala
In this series of simulating and troubleshooting performance problems in Scala articles, let’s discuss how to simulate CPU consumption to spike up to 100% on a host (or container) and troubleshoot it. Scala sample program CPU consumption will spike up whenever a thread goes on an infinite loop. Here is a sample Scala program, which... Continue Reading →
Simulating & troubleshooting OOMError in Scala
In this series of simulating and troubleshooting performance problems in Scala, let’s discuss how to simulate the ‘java.lang.OutOfMemoryError: Java Heap space’ problem. ‘java.lang.OutOfMemoryError: Java Heap space’ will be thrown by the Scala application, when it generates more objects than the maximum configured heap size. Video: To see the visual walk-through of this post, click below: https://youtu.be/aoLHQsyCCyE... Continue Reading →
Simulating & troubleshooting BLOCKED threads in Scala
In this series of simulating and troubleshooting performance problems in Scala, let’s discuss how to make threads go into BLOCKED state. A thread will enter into a BLOCKED state when it couldn’t acquire a lock on an object because another thread already holds the lock on the same object and doesn’t release it. Video: To... Continue Reading →
Simulating & troubleshooting Thread leak in Scala
In this series of simulating and troubleshooting performance problems in Scala, let’s discuss how to simulate thread leaks. ‘java.lang.OutOfMemoryError: unable to create new native thread’ will be thrown when more threads are created than the memory capacity of the device. When this error is thrown, it will disrupt the application’s availability. Video: To see the... Continue Reading →
Simulating & troubleshooting StackOverflowError in Scala
In this series of simulating and troubleshooting performance problems in Scala, let’s discuss how to simulate StackOverflowError. StackOverflowError is a runtime error, which is thrown, when a thread's stack size exceeds its allocated memory limit. Video: To see the visual walk-through of this post, click below: https://youtu.be/PxfWuBEBcW8 Sample Program Here is a sample Scala program,... Continue Reading →
Simulating & troubleshooting OOMError in Kotlin
In this series of simulating and troubleshooting performance problems in Kotlin, let’s discuss how to simulate the ‘java.lang.OutOfMemoryError: Java Heap space’ problem. ‘java.lang.OutOfMemoryError: Java Heap space’ will be thrown by the application, when it generates more objects than the maximum configured heap size. Video: To see the visual walk-through of this post, click below: https://youtu.be/y9Iydjrnix8... Continue Reading →
Simulating & troubleshooting StackOverflowError in Kotlin
In this series of simulating and troubleshooting performance problems in Kotlin, let’s discuss how to simulate StackOverflow errors. StackOverflow error is a runtime error, which is thrown when a thread's stack size exceeds its allocated memory limit. Video: To see the visual walk-through of this post, click below: https://youtu.be/dP-pPahkuLM Sample Program Here is a sample... Continue Reading →
Simulating & troubleshooting Thread leak in Kotlin
In this series of simulating and troubleshooting performance problems in Kotlin, let’s discuss how to simulate thread leaks. ‘java.lang.OutOfMemoryError: unable to create new native thread’ will be thrown, when more threads are created than the memory capacity of the device. This error will disrupt the application’s availability. Video: To see the visual walk-through of this post,... Continue Reading →
Simulating & troubleshooting BLOCKED threads in Kotlin
In this series of simulating and troubleshooting performance problems in Kotlin, let’s discuss how to make threads go into BLOCKED state. A thread will enter into a BLOCKED state when it couldn’t acquire a lock on an object because another thread already holds the lock on the same object and doesn’t release it. Video: To... Continue Reading →