Mautic Import stuck in progress

Your software
My Mautic version is: 4.4.4
My PHP version is: 7.4
My Database type and version is: MariaDB

Your problem
My problem is: In Mautic I can not import large files but I was able to import same size files before. (Small files are importing fine with no errors)

These errors are showing in the log:

Steps I have tried to fix the problem:
I have increased MYSQL and MariaDB configurations that could have limited Megabytes or import time.

Also I have increased limits in php configurations, to be exact these changes have been made for php.ini:

/home/mydomain.com/domains/ems.mydomain.com/etc/php.ini

/home/mydomain.com/domains/ems.mydomain.com/etc/php7.4/php.ini

and I set values to:

memory_limit=512M

upload_max_filesize=100M

post_max_size=128M

max_execution_time=7200

I get this error when importing:

ubuntu@mail:~$ sudo /usr/bin/php /home/mydomain.com/domains/ems.mydomain.com/public_html/bin/console mautic:import
Import 34 with 9501 rows is starting.
2785/9501 [========>-------------------] 29%
In AbstractMySQLDriver.php line 112:

An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused

In Exception.php line 18:

SQLSTATE[HY000] [2002] Connection refused

In PDOConnection.php line 40:

SQLSTATE[HY000] [2002] Connection refused

mautic:import [-i|–id [ID]] [-l|–limit [LIMIT]] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-e|–env ENV] [–no-debug] [–]