Skip to content

Socket write failure crashes program #168

@cosmastech

Description

@cosmastech

Hello all!

We intermittently get this failure on our production environments.

ErrorException: socket_sendto(): Unable to write to socket [111]: Connection refused in /var/www/vendor/datadog/php-datadogstatsd/src/DogStatsd.php:502

We are running on a Kubernetes cluster.

This is incredibly frustrating, as we have to wrap every call to write metrics in try-catches to avoid having DB transactions rolled back or returning 500 errors to users.

Was wondering if there's any reason that this would be happening, and if there should be a configuration option to allow gracefully handling these? (See: League's statsd implementation https://github.com/thephpleague/statsd/blob/master/src/Client.php#L341-L354)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions