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

Metrics initializes four times #65

Open
InboxViktorV opened this issue Dec 15, 2021 · 2 comments
Open

Metrics initializes four times #65

InboxViktorV opened this issue Dec 15, 2021 · 2 comments

Comments

@InboxViktorV
Copy link

Hi everyone. Is it a bug, or expected behaviour?
The roadrunner initialize kernel four times -> metrics also initializes four times -> as a result system throws errors:

weather    | 2021/12/15 05:38:42	INFO	metrics     	declaring new metric	{"name": "metno_provider_req_duration", "type": "histogram", "namespace": ""}
weather    | 2021/12/15 05:38:42	INFO	metrics     	metric successfully added	{"name": "metno_provider_req_duration", "type": "histogram", "namespace": ""}
weather    | 2021/12/15 05:38:42	INFO	metrics     	declaring new metric	{"name": "metno_provider_req_duration", "type": "histogram", "namespace": ""}
weather    | 2021/12/15 05:38:42	ERROR	metrics     	metric with provided name already exist	{"name": "metno_provider_req_duration", "type": "histogram", "namespace": ""}
weather    | 2021/12/15 05:38:42	INFO	metrics     	declaring new metric	{"name": "metno_provider_req_duration", "type": "histogram", "namespace": ""}
weather    | 2021/12/15 05:38:42	ERROR	metrics     	metric with provided name already exist	{"name": "metno_provider_req_duration", "type": "histogram", "namespace": ""}
weather    | 2021/12/15 05:38:42	INFO	metrics     	declaring new metric	{"name": "metno_provider_req_duration", "type": "histogram", "namespace": ""}
weather    | 2021/12/15 05:38:42	ERROR	metrics     	metric with provided name already exist	{"name": "metno_provider_req_duration", "type": "histogram", "namespace": ""}

How to avoid those errors? Or somehow fix them?

  • symfony: 5.3
  • baldinof/roadrunner-bundle: 2.1.3
  • roadrunner: 2.4.2
@Baldinof
Copy link
Owner

Hi!

I don't know if it's expected but it's an upstream issue.

If you folllow the documentation here you get the same logs. Despite the messages, everything work well.

@eightfourseventwo
Copy link

I'm guessing your CPU has 4 cores? I have the amount of workers set to 10 and I get the error 10 times. I suppose that is to be expected because each RR worker runs in isolation so it starts your app again for each worker.

You can get around this by defining the metrics in rr.yaml instead of the bundle configuration.

I suppose there is no way to fix this. It could perhaps just be a README update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants