-1

I created an app that has a Gearman worker that pushes information to New Relic Insights. Everything works fine, but when I run the testing script on Terminal, the following error messages appears (after process is done):

{"error":{"type":"ErrorException","message":"Array to string conversion","file":"\/usr\/local\/share\/gearman-manager\/GearmanPeclManager.php","line":60}}

I have looked in to the Gearman documentation and I cannot find anything that might help me find the source of this message.

The app basically sends a JSON to New Relic Insights, and since New Relic Insights require that each JSON has a maximum of 1000 events, I set up the script to break the array in chunks when there are more than 1000 events in the JSON.

Can anyone give me an insight on what it means and how can I solve it?

  • I'm not sure it's PHP that's throwing this error. – esqew Aug 11 '14 at 13:07
  • 2
    Go to line 60 of the mentioned file in the error message. Study the code there and var_dump all the variables used in that vicinity. See what is expected there and what you are getting, and post the result. –  Aug 11 '14 at 13:11
  • Code on the server is kicking out an error; what is likely happening is that a function is being called that expects a string but is instead getting an array and generating the error, sending out the error and perhaps causing an interruption of the designated process and invalidating all the other results, which then are not sent out, depending on how the process has been designed. – Malovich Aug 11 '14 at 13:28

1 Answers1

1

I don't think this is an issue with PHP or New Relic. I'd suggest opening an issue on the Gearman GitHub project as there looks to be an issue on line 60 of GearmanPeclManager.php: https://github.com/brianlmoon/GearmanManager/

^I'm not 100% sure that's the right repository but it sure seems like it.

karlpcrowley
  • 526
  • 2
  • 7