Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Failed to write message size for Scoutapm\Events\Request\Request - error 32 #254

Open
m4rcoperuano opened this issue Nov 30, 2021 · 1 comment
Labels
question Further information is requested

Comments

@m4rcoperuano
Copy link

Hello! We're using Laravel 8.x, and frequently we've run into this issue:

[Scout] Failed to write message size for Scoutapm\Events\Request\Request - error 32 (Broken pipe). Address was: tcp://127.0.0.1:6590

Do you know what would cause this? Our Laravel 8.x instance runs on 2 virtual machines, connected to a memory store on another service, as well as a managed sql database.

@jrothrock
Copy link

Hey @m4rcoperuano,

With the PHP agent there are two components to it. One part is the PHP agent and the other is the core-agent. The core-agent is a binary that we ship with the PHP agent that daemonizes on startup and collects, aggregates, and ships the requests that the PHP agent passes off to it once the request completes

To do this, the PHP agent sends the request data via a TCP socket (127.0.0.1:6590) to the core-agent. What is happening is that the core-agent for some reason is closing the socket

When you say frequently, how often are you seeing this message? Every hour? Every few minutes? If the socket closes we should reopen on the next request/attempt

We will need logs from the core-agent to understand this a bit more

Would it be possible to follow our Troubleshooting docs outlined here:
https://scoutapm.com/docs/core-agent#troubleshooting

However, instead of binding to 6590, would it be possible to bind it to 6591:

./core-agent start --daemonize false --log-level trace  --tcp 127.0.0.1:6591 --log-file ./core-agent.log

If you were to run ps aux | grep core-agent in a separate window, you should see two instances on on the 6590 and the second on 6591.

Then in your .env would it be possible to set the follow variable and deploy your application:
SCOUT_CORE_AGENT_SOCKET_PATH = "tcp://127.0.0.1:6591"

This should then start sending data to the newly created core-agent process and you should see logs in the ./core-agent.log file

Once enough time has elapsed, and you have seen a (Broken Pipe) in the Laravel logs, you can remove the environment variable and redeploy your app to use the original core-agent process, and kill the new one

Then would it be possible to send us the generated ./core-agent.log file?

@asgrim asgrim transferred this issue from scoutapp/scout-apm-laravel Jan 19, 2022
@asgrim asgrim added the question Further information is requested label Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants