AWS Lamda with mongodb connection issue

Hi, I have an issue, Connecting to mongodb from AWS Lamda (Nodejs) getting connection error in some times. I changed the connection which explained in mongodb document (Out side the handelr function) but still the issue getting . I think it happen when frequently access the lamda. anyone know this issue or how to solve this issue?