Posts

Showing posts from September, 2018

How to deal with java.lang.OutOfMemoryError

First, when java.lang.OutOfMemoryError  error thrown? - when there is insufficient space to allocate an object in the Java heap - when there is insufficient native memory to support the loading of a Java class - when an excessive amount of time is being spent doing garbage collection and little memory is being freed Check, Was it thrown  - because the Java heap is full? - because the native heap is full?  Particularly, investigate right after the full GC happen. - Mainly, it's about allocation and reference. - Using profiler to check allocation and reference are on its purpose. - soft reference / weak reference Look into Code. - Estimate the size of memory needed in the application. - Evaluate how much you can reduce the amount of memory. - get the leak point. Rarely  - increase max heap size - scale-up/out  machine References -  https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/memleaks002.html - https:/...

Data migration on PRD

Sometimes, data should be migrated on PRD environment. Some kind of things should be considered before migration start. 1. How long does it take to complete the migration job? In PRD environment, user data is changing in real time. Suppose we have to move user's content. User can add or delete contents whenever they want. If all users upload new contents ( for example, their photos, videos ) and the size of new contents is always bigger than the size of the contents we can migrate, this migration never ends. 2. Users don't need to know the behind scene. As a customer, we don't want to see pop-up saying "Your data is migrating now.. so visit again later."  If it is possible, data migration process and user request handling process should be separated. For example, serve them with original data until migrated. After migration completed, route the user request to migrated service. 3. Integrity!!! The most important thing we must care about in migration...

Definite Sentences

Practice makes perfect. Later never comes. The moment learning and training end is the moment my career ends.

Being a software craftman step by step

Recently, I started to prepare for the next step of my career. As a software engineer, I think I need a blog to review and write about experience so that I can remember. It will be about  - things what I need to become a senior/better engineer - experienced issues from work - personal diaries I cannot become an expert at one day. Maybe I would be if I grow up step by step, day by day. To record and review this process, I start this blog.