I just try to import a large forum (the SQL export, uncompressed is about 170Mb) and I have to set a my.cnf configuration file with the following content in order to import all, specially during URLs conversions:
connect_timeout = 600
wait_timeout = 86400
max_connections = 100000
max_allowed_packet = 512M
max_connect_errors = 1000
I add then a conf directory with file (my.cnf) in docker-compose.yml for mariadb:
For information, everything run Ok, after more than one hour of migration (and some fixes in source db), with more than 18.000 users and 154.000 topics.