GithubHelp home page GithubHelp logo

Comments (5)

MisterRayCo avatar MisterRayCo commented on May 30, 2024

Hi @recarv thanks for reporting this!
Could you tell us what line of code is creating that error?
Can you also confirm that the dogstatsd.php you're requiring is on your include_path: 'get_include_path()'
Also, what version of PHP are you on?

Thanks!

from php-datadogstatsd.

recarv avatar recarv commented on May 30, 2024

Hi,

The line was Datadogstatsd::increment('my aggregator')

I can confirm that the datadogstatsd.php was in the include path

PHP 5.3

Let me know if this helps and if there is a fix. I'm pretty sure the issue
is because we're using unix sockets between nginx and php-fpm instead of
127.0.0.1:9000. I'm guessing the socket methods used in the class might
not play well in this instance (which is a pity because unix sockets are
faster than tcp).

Ross

On Wed, Oct 16, 2013 at 4:52 PM, MisterRayCo [email protected]:

Hi @recarv https://github.com/recarv thanks for reporting this!
Could you tell us what line of code is creating that error?

Can you also confirm that the dogstatsd.php you're requiring is on your
include_path: 'get_include_path()'
Also, what version of PHP are you on?

Thanks!


Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-26456868
.

Ross Carver
[email protected]
Avantalytics Corp
Ph. 866-302-6747
Ph. 703-254-9294 (mobile)

from php-datadogstatsd.

clofresh avatar clofresh commented on May 30, 2024

Hmm, I'm not sure how the connection between nginx and php-fpm would affect connections that the php-fpm process makes to other processes. Could you test a minimal socket call? Instead of Datadogstatsd::increment(), can you replace it with:

$socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
socket_set_nonblock($socket);
$stat = 'test.metric';
$value = '5|c';
socket_sendto($socket, "$stat:$value", strlen("$stat:$value"), 0, 'localhost', 8125);
socket_close($socket);

from php-datadogstatsd.

recarv avatar recarv commented on May 30, 2024

Hmm, I plugged in the code fragment and tested it and it worked fine, so
that is good. Then I tried uncommenting the increment call to see if broke
again and it didn't. Bizarre. I guess this one can be closed!

Thx, Ross

On Mon, Oct 21, 2013 at 2:12 PM, Carlo Cabanilla
[email protected]:

Hmm, I'm not sure how the connection between nginx and php-fpm would
affect connections that the php-fpm process makes to other processes. Could
you test a minimal socket call? Instead of Datadogstatsd::increment(), can
you replace it with:

$socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
socket_set_nonblock($socket);
$stat = 'test.metric';
$value = '5|c';
socket_sendto($socket, "$stat:$value", strlen("$stat:$value"), 0, 'localhost', 8125);
socket_close($socket);


Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-26741599
.

Ross Carver
[email protected]
Avantalytics Corp
Ph. 866-302-6747
Ph. 703-254-9294 (mobile)

from php-datadogstatsd.

clofresh avatar clofresh commented on May 30, 2024

Cool, reopen if you're still having problems.

from php-datadogstatsd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.