Closed TKrisee closed 3 weeks ago
Hey, can you please send me the output of http://your.app/__clockwork/1659619567-1067-1921841239/extended
to info@underground.works
for further investigation?
This will contain various details about your app, please make sure you are not sharing something you are not comfortable with.
Hey, can you please send me the output of
http://your.app/__clockwork/1659619567-1067-1921841239/extended
toinfo@underground.works
for further investigation?This will contain various details about your app, please make sure you are not sharing something you are not comfortable with.
Sure, I've sent you a mail with two files actually, hope it will help
Hey @TKrisee , I had a similar issue today. I was using Sail and only had to add these to the .env:
SAIL_XDEBUG_MODE=profile
SAIL_XDEBUG_CONFIG="client_host=host.docker.internal profiler_output_name=cachegrind.out.%R"
I dont know if its because of how Clockwork reads the profiler output, but this is why it works: https://github.com/underground-works/clockwork-app/issues/109#issuecomment-1252998149
I know this issue is old but there's a lack of info regarding the "Performance -> Profiler" tab in Clockwork to work with Docker so let me give my two .cents of contribution
First of all, no, if you use Docker the Clockwork plugin won't magically access the files within, you'll need to create a volume outside the container and do a little of configuration, at the end is simple, steps bellow:
Xdebug ini config (explanation first)
So the xdebug.ini file will look like this:
xdebug.mode = profile
xdebug.start_with_request = trigger
xdebug.output_dir = /cache
xdebug.profiler_append = 1
Docker Compose
Your 'volumes' config in you 'docker-compose.yml' file will look something like this:
volumes:
- '.:/var/www/html'
- './docker/xdebug.ini:/etc/php/8.1/cli/conf.d/xdebug.ini'
- './cache:/cache'
Also Xdebug automatically send a Http Header with the location of the profile file called 'X-Xdebug-Profile-Filename', and of course it uses the 'output_dir' config. It will look something like this:
X-Xdebug-Profile-Filename: /cache/cachegrind.out.19
Which will point to your machine's root not the project root which usually doesn't have a /cache directory (change to a different name if it does), then you'll need to create a symlink from your projects cache dir to that dir, it will look something like this:
sudo ln -s /home/<your user>/your/project/directory/cache /cache
That's all, remember to click in the Enable Profile button in the "Profiler" tab and you are good to go.
As a final advice, remember deleting your cachegrind.out file as it gets bigger pretty fast (each refresh on page) and it starts lagging the Clockwork extension when you open the Profiler tab
I don't think you want to use xdebug.profiler_append
, as this will cause all requests to be merged into a single profile.
I have the same issue.
Please see the updated Xdebug setup instructions on the Clockwork website - https://underground.works/clockwork/#docs-xdebug-profiler - feel free to reopen if this is still an issue for you.
I'm trying to get clockwork to work with the xdebug profiler within sail (laravel docker) to no avail.
The related php.ini config
I've checked the previous issues regarding this topic and I disabled the compressions in the xdebug config, but it did not change anything.
The filename is present in the response header and also exists on the filesystem, but for some reason, clockwork is stuck on "Processing profile..."
Am I missing something here?