Data processing in Parallel (Hackathon project)

thank you very much! , that’s solve my issue. I get no errors anymore logged.
Now I have to find out why the process still creating records although the end of the file was reached.

The file containing products:

cat file.csv | wc -l
10000000

Total products created in the database:

mysql> select count(*) from products;
+-----------+
| count(*)  |
+-----------+
| 109958881 |
+-----------+
1 row in set (15.69 sec)