scoutapp / scout-apm-laravel

ScoutAPM PHP Agent for the Laravel Framework
MIT License
22 stars 12 forks source link

Site is throwing a 500 error - Laravel Scout Agent is starting #78

Closed RTSchriner closed 2 years ago

RTSchriner commented 3 years ago

Description: I installed Scout APM on my site last night and everything was fine. This morning the site is throwing a 500 error.

Error: Laravel Scout Agent is starting

Environment: Laravel Version: 5.8.*

dlanderson commented 3 years ago

Sorry for the issue, @RTSchriner. A few questions:

RTSchriner commented 3 years ago

@dlanderson: I believe I have tracked it down to the error log file permissions.

I will post more about this once I have found a solution.

RTSchriner commented 3 years ago

@dlanderson: So the laravel log file is being created as the root user instead of www-data which is what causes the 500 error.

Notice how the laravel-2021-09-17.log file has root:root owner and group but the others have www-data:www-data.

image

Any idea what would cause this?

RTSchriner commented 3 years ago

Do you have any further logs we can analyze?

No, not at this time.

Which version of scout-apm-laravel are you running?

2.0.0

Were you running the Scout PECL extension as well?

No, I don't believe so.

asgrim commented 2 years ago

@RTSchriner the log file being created with root may be caused by running artisan commands with sudo (e.g. during deployment), using a Docker environment, or at some point Apache / PHP running as root perhaps; there are numerous causes in reality, but I do not believe this is a ScoutAPM issue, as we do not request elevated permissions for anything.