Merge "Bound pending write events queue to avoid OOM"