Skip to content

Uncaught RuntimeException when Matomo host DNS couldn't resolve #105

@timreeves

Description

@timreeves

Sometimes there's a problem with DNS and an address cannot be resolved. Then sadly, the tracker crashes out:

[11-Aug-2022 00:17:31 Europe/Berlin] PHP Fatal error: Uncaught RuntimeException: Could not resolve host: m.biblische-re
isen.de in /var/www/vhosts/biblische-reisen.de/biblical-tours.com/MatomoTracker.php:1761
Stack trace:
#0 /var/www/vhosts/biblische-reisen.de/biblical-tours.com/MatomoTracker.php(644): MatomoTracker->sendRequest()
#1 /var/www/vhosts/biblische-reisen.de/biblical-tours.com/config/analytics-body.php.inc(22): MatomoTracker->doTrackPageV
iew()
#2 /var/www/vhosts/biblische-reisen.de/biblical-tours.com/include/prototype/tail.php.inc(251): include('/var/www/vhosts.
..')
#3 /var/www/vhosts/biblische-reisen.de/biblical-tours.com/index.php(61): include('/var/www/vhosts...')
#4 {main}
thrown in /var/www/vhosts/biblische-reisen.de/biblical-tours.com/MatomoTracker.php on line 1761

The adress resolves normally except when there's a problem with connectivity to DNS-Servers. Would be great if this could be caught and maybe retried a couple of times.

Thanks for the great work, the tracker is just what I needed!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions