Minecraft wiki entry for Farming, associated text: Mobs will generally despawn if they do not have a player nearby; details vary by version, but in general mobs can randomly despawn if no player has been within 32 blocks for at least 30 seconds (sometimes 10 seconds), or if no player is within 128 blocks. In either case, the chunk needs to still be loaded for the despawning process to work. This affects most mob farms, especially those which depend on hostile mobs.