I have an API parsing script, which inserts into the db more than 40,000 rows.and maybe due large numbers of queries getting fired continuously, after some specific time the script throws "MySQL server has gone away" error.
I know the reason behind this error can be closed connection or any other privileges on the mysql server.
How should I deal with this error , so that i can execute the script completely.
Jump to Post
If you really need to do this this way, then creating a msqli_multi_query could help. That way the server gets all queries at once, and does not need to handle each query separately.