PHP asynchronous calls aren't firing

KevinMiraglia

Posted on
Jun 26 2014

Using PHP, we're setting the asynchronous flag to true results in errors not being submitted to RayGun

$client = new \Raygun4php\RaygunClient("apiKey", true);

When I let it use the default of false, errors are being submitted to RayGun (but the curl call blocks).

Is there anything else that is required to get RayGun to work asynchronously?


Callum

Posted on
Jun 26 2014

Hi Kevin,

What operating system is your server running - Windows or a Linux/*nix/OS X environment?


KevinMiraglia

Posted on
Jun 26 2014

Its running Centos 5.10 (Linux)


KevinMiraglia

Posted on
Jul 08 2014

Is there any progress on this? I haven't heard anything back from since responding with our operating system.

Thanks, Kevin


Callum

Posted on
Jul 08 2014

Apologies for the delay on this one, this is in our support queue and we will take some time to spin up a VM and attempt to repro it this week. It may be revealing to turn display_errors to on in a dev environment to see if the script is erroring out.

Regards,

Callum Gavin
Mindscape Limited


Callum

Posted on
Jul 08 2014

Hi again,

We've had an attempt at reproducing this and it looks to be working fine on a brand new CentOS 5.10 install - the provider defaults to non-blocking which is received by the Raygun backend correctly, and the same goes for passing in both true and false into the RaygunClient contructor - the response times back to the remote are around 20ms and 300ms, respectively from my machine. Note that CentOS 5.10 appears to by default install PHP 5.1 which is of course unsupported by the provider, but I imagine you're running at least PHP 5.3 as you have the blocking socket send method working when passing in false.

Something to check would be that curl is installed and enabled in php.ini - this is confirmed working with curl v7.15.5. If you can provide any other pertinent environment data or a repro project we will continue looking into this for you.


KevinMiraglia

Posted on
Jul 11 2014

It turns out we were using an older version of the Raygun4Php client. I checkout out new version from git and now it appears to be running asynchronously.

Sorry, Thanks,

Kevin


Reply