I am attempting to debug a performance issue in my Laravel PHP application. I have Blackfire and JMeter installed on Debian 7 in a Apache / Postgres / PHP5-FPM / Redis stack.
If I run Blackfire normally, I get precisely what I want.
# blackfire --samples 5 curl http://larachan.foo
Profiling: [########################################] 5/5
Blackfire cURL completed
Profile URL: https://blackfire.io/profiles/xxx/graph
Wall Time 263ms
CPU Time 190ms
I/O Time 72.7ms
Memory 8.74MB
Network n/a n/a -
SQL n/a -
I have a very, very simple JMeter test that does nothing but load my application's homepage as many times as it can. I am able to see performance degradation with the test running. Here is the UI for the Java applet.
Very simple.
So now if I run Blackfire with this test going, I get an error.
# blackfire --samples 5 curl http://larachan.foo
Profiling: [######### ] 2/5
Are you authorized to profile this page? No probe response, missing PHP extension or invalid signature for relaying agent.
That's no good. There is a very short, unhelpful message in the Blackfire agent log.
[2016-01-07T17:49:22-05:00] ERROR: Error while writing to probe: write unix @: broken pipe
[2016-01-07T17:49:22-05:00] ERROR: Profile data is truncated. Please check https://blackfire.io/doc/troubleshooting#trouble-no-response
A review of that documentation provides no information of use.
I have specified in my PHP-FPM Config file for Blackfire to timeout after 30 seconds. I have also asked it to put PHP related errors in a specific log file, but that never appears.
I can very accurately reproduce this problem even in the middle of a test. If I activate JMeter at any point during a 10 sample test (even if it's 1 test away from completion), it will bail out with the exact same error message.
Does anyone have any idea why this could happen?
With such a Jmeter plan, you are going to issue 8 concurrent requests, with no pause in between: like ceejayoz said, it is a kind of DOS.
Under these conditions, based on the errors you are getting, the probe seems not to be responsive enough.
I would start by adding a throughput controller, configuring 1 request/second/thread (or a similar value). Then you can run a check with a single thread. If it works, you can increase the number of threads and see where the problems begin.
I don't know much of Blackfire, but it seems tome more oriented to check page performances not load performances.