Try looking for a pattern with regards to what might have been missed. Lets say you have 4000 records create 10 batches of 400 each and try to upload it. Doing this way you may have a theory on what could be causing data importation to fail. Most likely it might either have to do:
Data formatting issues
Missing mandatory fields
Give the above approach a go we might have more information to debug the issue
Here are few links to posts on related topics that might help
importing via the API solved some of the issues I encountered
Importing contacts requires a first name. However no errors were thrown about entries missing a first name. Making sure all entries had all of the mandatory fields fixed a lot
My general approach to importing these large datasets into ERPNext is to: