Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Failed to execute cmd: " dot -Tsvg". stderr: Fontconfig error: No writable cache directories #5

Closed
i3bepb opened this issue Dec 16, 2024 · 10 comments · Fixed by #6 or #7
Closed

Comments

@i3bepb
Copy link
Contributor

i3bepb commented Dec 16, 2024

I use :

docker run --rm -e XHPROF_OUTPUT_DIR=/var/www/html/logs -v $(pwd)/www/main/storage/logs/xhprof:/var/www/html/logs wodby/xhprof:2.3-3.12.0

When I go to the [View Full Callgraph] I get an error

failed to execute cmd: " dot -Tsvg". stderr: Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
@csandanov
Copy link
Member

try changing your bind mount to -v $(pwd)/www/main/storage/logs/xhprof:/mnt/files/private/xhprof without setting XHPROF_OUTPUT_DIR which is incorrect btw and should be PHP_XHPROF_OUTPUT_DIR (default value is mnt/files/private/xhprof which is a dir with correct permissions)

@i3bepb
Copy link
Contributor Author

i3bepb commented Jan 9, 2025

try changing your bind mount to -v $(pwd)/www/main/storage/logs/xhprof:/mnt/files/private/xhprof without setting XHPROF_OUTPUT_DIR which is incorrect btw and should be PHP_XHPROF_OUTPUT_DIR (default value is mnt/files/private/xhprof which is a dir with correct permissions)

README.md say use XHPROF_OUTPUT_DIR

https://github.com/wodby/xhprof?tab=readme-ov-file#environment-variables

@csandanov
Copy link
Member

Corrected, thank you

@csandanov
Copy link
Member

I changed the default output dir to /mnt/files/xhprof, makes no sense to keep it under private and we already have the directory created in the base wodby/php image

@i3bepb
Copy link
Contributor Author

i3bepb commented Jan 9, 2025

I use your project only to view profiling results. For this, enabling the xhprof is not necessary. Default it is turned off via a variable - PHP_EXTENSIONS_DISABLE. Therefore the xhprof config is not created and variable PHP_XHPROF_OUTPUT_DIR not use. But variable XHPROF_OUTPUT_DIR use when call ini_get("xhprof.output_dir").

@csandanov
Copy link
Member

oh that's a bug, the default value of PHP_EXTENSIONS_DISABLE was a relatively recent change, now fixed

@i3bepb
Copy link
Contributor Author

i3bepb commented Jan 9, 2025

When I build local, then everything is fine. But I use last image - wodby/xhprof:2.3-3.13.2, I again get error

Fontconfig error: No writable cache directories

@i3bepb
Copy link
Contributor Author

i3bepb commented Jan 11, 2025

In wodby/xhprof:2.3-3.13.3 has not changed. Need rebuild

@csandanov
Copy link
Member

Should be good now

@i3bepb
Copy link
Contributor Author

i3bepb commented Jan 11, 2025

All is well !

image

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
2 participants