023-11-30 10:13:15,507: [INFO] Error when connecting to Matomo: <urlopen error [Errno -3] Temporary failure in name resolution>

We use Matomo on a production server. Unfortunately we have problems with import_logs.py.
On one in about 15 import sessions matomo prints the error “[INFO] Error when connecting to Matomo: <urlopen error [Errno -3] Temporary failure in name resolution>”

I would like to understand, where this error comes from and how to solve this issue.

We use Matomo-Version: 4.15.1
MySQL-Version: 10.3.38-MariaDB-0ubuntu0.20.04.1
PHP-Version: 8.2.13

The website where the python script imports its access.logs and matomo are hosted on the same server.

import_logs.py access_ssl_log.processed.9 --url=https://matomo.xxx.xxx --php-binary=/opt/plesk/php/8.2/bin/php --idsite=1
0 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
Parsing log access_ssl_log.processed.9...
10536 lines parsed, 0 lines recorded, 0 records/sec (avg), 0 records/sec (current)
12322 lines parsed, 200 lines recorded, 99 records/sec (avg), 200 records/sec (current)
15498 lines parsed, 400 lines recorded, 133 records/sec (avg), 200 records/sec (current)
18312 lines parsed, 600 lines recorded, 149 records/sec (avg), 200 records/sec (current)
20417 lines parsed, 800 lines recorded, 159 records/sec (avg), 200 records/sec (current)
20417 lines parsed, 800 lines recorded, 133 records/sec (avg), 0 records/sec (current)
23467 lines parsed, 1000 lines recorded, 142 records/sec (avg), 200 records/sec (current)
25879 lines parsed, 1200 lines recorded, 149 records/sec (avg), 200 records/sec (current)
25879 lines parsed, 1200 lines recorded, 133 records/sec (avg), 0 records/sec (current)
25879 lines parsed, 1200 lines recorded, 119 records/sec (avg), 0 records/sec (current)
25879 lines parsed, 1200 lines recorded, 108 records/sec (avg), 0 records/sec (current)
25879 lines parsed, 1200 lines recorded, 99 records/sec (avg), 0 records/sec (current)
25879 lines parsed, 1200 lines recorded, 92 records/sec (avg), 0 records/sec (current)
25879 lines parsed, 1200 lines recorded, 85 records/sec (avg), 0 records/sec (current)
25879 lines parsed, 1200 lines recorded, 79 records/sec (avg), 0 records/sec (current)
25879 lines parsed, 1200 lines recorded, 74 records/sec (avg), 0 records/sec (current)
2023-11-30 10:13:15,507: [INFO] Error when connecting to Matomo: <urlopen error [Errno -3] Temporary failure in name resolution>
2023-11-30 10:13:15,508: [INFO] Retrying request, attempt number 2
25879 lines parsed, 1200 lines recorded, 70 records/sec (avg), 0 records/sec (current)
25879 lines parsed, 1200 lines recorded, 66 records/sec (avg), 0 records/sec (current)
25879 lines parsed, 1200 lines recorded, 63 records/sec (avg), 0 records/sec (current)
25879 lines parsed, 1200 lines recorded, 59 records/sec (avg), 0 records/sec (current)
25879 lines parsed, 1200 lines recorded, 57 records/sec (avg), 0 records/sec (current)
25879 lines parsed, 1200 lines recorded, 54 records/sec (avg), 0 records/sec (current)
25879 lines parsed, 1200 lines recorded, 52 records/sec (avg), 0 records/sec (current)
25879 lines parsed, 1200 lines recorded, 49 records/sec (avg), 0 records/sec (current)
25879 lines parsed, 1200 lines recorded, 47 records/sec (avg), 0 records/sec (current)
25879 lines parsed, 1200 lines recorded, 46 records/sec (avg), 0 records/sec (current)
25879 lines parsed, 1200 lines recorded, 44 records/sec (avg), 0 records/sec (current)
25879 lines parsed, 1200 lines recorded, 42 records/sec (avg), 0 records/sec (current)
27700 lines parsed, 1400 lines recorded, 48 records/sec (avg), 200 records/sec (current)
30713 lines parsed, 1600 lines recorded, 53 records/sec (avg), 200 records/sec (current)
32431 lines parsed, 1800 lines recorded, 57 records/sec (avg), 200 records/sec (current)
35490 lines parsed, 2000 lines recorded, 62 records/sec (avg), 200 records/sec (current)
37967 lines parsed, 2200 lines recorded, 66 records/sec (avg), 200 records/sec (current)
40426 lines parsed, 2400 lines recorded, 70 records/sec (avg), 200 records/sec (current)
40426 lines parsed, 2400 lines recorded, 68 records/sec (avg), 0 records/sec (current)

I appreciate any help to debug and solve this issue

Our python version is 3.8 on Ubuntu 20.04.6 LTS.

Hi @moonriseart
Googling your issue, it seems this comes from Python. Is your network connection always running well? Isn’t the server too much overloaded?
Does it prevent you to import data? (does Matomo retry the log extraction?)