Probe not found, profiling failed... Here's how to get logs so we can help you!
If you can't find a solution to your problem, please contact us via the chat icon you'll find at the bottom right-hand side of your browser window.
Please include the following information in your issue
-
Your platform (e.g. macOS, Debian wheezy x86, Ubuntu Precise x64, etc...);
-
The version of your Blackfire agent:
-
If you are using v2, run
blackfire version
command; -
If you are using legacy v1 (deprecated), run
blackfire-agent -v
command;
-
-
The content of the Probe log file (read below);
-
The content of the Agent log file (read below);
PHP
-
The output of
php -v
command. -
The output of
php -d display_startup_errors=on --ri blackfire
command.
Python
-
The output of
pip show blackfire
You can drag and drop files to the chat window.
Getting logs from Blackfire
PHP Probe logs
-
Increase the Probe log level from your
php.ini
file, to the debug level by configuring it withblackfire.log_level=4
andblackfire.log_file=/tmp/blackfire.log
(refer to the Probe configuration for more information); -
⚠️ Do not forget to restart the web server or PHP-FPM to reload the configuration;
-
Profile your code again.
Python Probe logs
-
Increase the Probe log level to debug by setting
BLACKFIRE_LOG_LEVEL
environment variable to 4BLACKFIRE_LOG_LEVEL=4 blackfire-python run python example.py
-
The default log file is
python-probe.log
.
If the profile is running through Django, the log file is located in the same folder as the Django application wheremanage.py
resides.
If the profile is running viablackfire-python run
or manually, the log file is located in the same folder as the profiled script. -
You may customize the location of the log file by setting
BLACKFIRE_LOG_FILE
environment variable.
Agent logs
Note: this does not apply to Adobe Commerce Cloud, which can only get the probe logs.
-
Increase the Agent log level to debug by configuring it with
log-level=4
(refer to the Agent configuration for more information); -
⚠️ Do not forget to restart the Agent to reload its configuration;
-
Profile your code again;
-
Get the logs:
-
On Linux: default log files are in
/var/log/blackfire/agent.log
; -
On macOS: default log files are in
/usr/local/var/log/blackfire/agent.log
; -
On Windows: simply copy/paste the console output;
-
On Heroku: log files are in
/app/.blackfire/var/log/agent.log
.
-
Agent logs using the Blackfire Docker image
-
Increase the log level using the
BLACKFIRE_LOG_LEVEL
environment variable to 4 (debug level).
Refer to the "Debugging the Agent" section of the Docker documentation. -
Restart the container;
-
Profile your code again;
-
Get the logs:
-
When using
docker-compose
, you may rundocker-compose logs blackfire
to display them; -
When using only the
docker
command, rundocker logs <your_container_id>
-
Logs from Platform.sh
-
If needed, create a
BLACKFIRE_LOG_FILE
environment variable. This can be done from theplatform
command, from your Platform.sh web console, or within your.platform.app.yaml
file.
Set the value to e.g./tmp/blackfire.log
. -
Increase the verbosity to the debug level (level 4), by setting the
BLACKFIRE_LOG_LEVEL
environment variable; -
Redeploy;
-
Profile again;
-
Get the logs:
-
Open an SSH session to your Platform.sh container using
platform ssh
-
Display the contents of your log file using
cat /tmp/blackfire.log
-