AVD Internal Storage Is Full

I am using Appium java-client and Android to make a online testing system. The system uses android emulator to run the testing apk and capture screenshot by android driver. However after running a testing case for like an hour, the emulator pops up a “internal storage is almost full” message. Then the emulator crashes. The emulator is Android 4.4, the internal storage is set to 2G and the testing apk does not have memory leak problem since I have checked its cache file folder.
The screenshot of the storage page is as follows.

Any ideas? Thanks in advance.

This issue happens on android 4.4, 5.0.1 and 6.0

can you try by removing the other apps from the apps folder in settings and then try to run your app.

do you mean the default Android apps? The emulator is created without other apps except the Android default ones. And I have checked the files which pulled from the emulator, the occupied size does not match the size by using adb shell df command.

Is it working properly on android device.