Generate the players (run the for loop) before you connect to your DB, then insert in batches, I think inserting all 1000 at once might be the issue, instead, insert 50 (20 batches) or 100 (10 batches). Hope this helps.
Generate the players (run the for loop) before you connect to your DB, then insert in batches, I think inserting all 1000 at once might be the issue, instead, insert 50 (20 batches) or 100 (10 batches). Hope this helps.