Failed: connection(cluster0-shard-00-02.vwxk3a.mongodb.net:27016[-16]) unable to write wire message to network: write tcp : write: broken pipe

at 1.3% complete:
Failed: connection(
433000 document(s) imported successfully. 0 document(s) failed to import.

How big is your doc?

Check this link

Failed: connection(cluster0-shard-00-02.vwxk3a.mongodb.net:27016[-16]) unable to write wire message to network: write tcp : write: broken pipe and failed to connect to my server.js why

Did it work before or this is the first time you are facing this error
Can you connect by shell?
It could be with your env settings/ js code