Installing Blackfire

Installing and updating Blackfire should be a quick process. This document will guide you through the steps.

Loading...

To start using Blackfire, we are going to install the following:

  • A language extension;
  • An agent to communicate with Blackfire's servers;
  • A profiling client (a browser extension or a CLI tool).

Blackfire uses a custom Debian repository to distribute its packages; it is compatible with most Debian-based distributions like Ubuntu and Linux-Mint.

  1. Register the packagecloud key:
    Loading...
  2. Add the repository to Debian source list:
    Loading...
  3. Update the repositories:
    Loading...
  1. Install the blackfire package:
    Loading...
Loading...
  1. Loading...
    Learn more about the agent configuration file.
  2. Restart the agent service:
    Loading...

    During the agent installation, a new blackfire-agent service was created to start, stop, and restart it. Whenever you modify the agent configuration, restart it.

  3. If something goes wrong, check out the log file generated by default in /var/log/blackfire/agent.log. Change the log file or the log level in the agent configuration file.
  1. Install the blackfire-php package:
    Loading...
  2. Restart your web server or PHP-FPM and check that there are no errors in the logs. To debug problems, you can change the log level and the log file in the Probe configuration.

Known incompatibilities

PHP will likely crash when Blackfire is used when one of the following extensions is also enabled: XHProf, Pinba, and Suhosin.

If XDebug is installed, the PHP engine may not behave as expected; consider disabling it when profiling.

If pcov extension is installed, Blackfire will not behave as expected; consider disabling it when profiling.

You can now enable monitoring for your environments.

Loading...

To profile applications, you need to use a profiling client:

  • Profile from a browser via our browser extensions (Web applications only).

    Loading...
  • Profile from the command line via the blackfire tool (Web applications, APIs, command line tools, daemons, and more).

    Configure it with your personal credentials:

    Loading...

Start profiling via: