solve the OOM problem of BlockingQueue and null exception