getsentry / relay

Sentry event forwarding and ingestion service.
https://docs.sentry.io/product/relay/
Other
318 stars 91 forks source link

relay keep request projectconfigs,blocks the new event #3849

Closed pettysoldier closed 2 weeks ago

pettysoldier commented 2 months ago

Environment

self-hosted (https://develop.sentry.dev/self-hosted/)

Steps to Reproduce

docker

self-hosted 24.5.1

relay keep request projectconfigs,even i disable the DSN of the internal prject: image image

and the other custom project,also the same situation, when i report the event ,it blocks. then I disable the DSN of the custom project, and wait a minute , I enable the DSN, event report goes fine. but for a while , it keep blocks. and relay just print the /api/0/relays/projectconfigs/ logs.

i think the sentry web response pending status to relay,so relay put the request to a queue, keep on cosumer the queue.

any one have any idea?

Expected Result

/api/0/relays/projectconfigs/ return the right response

Actual Result

return the pending status

Product Area

Unknown

Link

No response

DSN

No response

Version

No response

getsantry[bot] commented 2 months ago

Assigning to @getsentry/support for routing ⏲️

aldy505 commented 2 months ago

Can you try applying additional config on nginx from this PR? https://github.com/getsentry/self-hosted/issues/3144

renchap commented 2 months ago

I have the same issue.

I tried applying the patch from getsentry/self-hosted#3144 and it does not seem to solve the issue, I still have those logs:

relay-1  | 2024-07-02T19:38:24.883886Z ERROR relay_server::services::project: there is no project state: dropping 1 buckets tags.project_key="055df87933ef4020a162cc1ffba278a8"
relay-1  | 2024-07-02T19:46:42.684376Z ERROR relay_server::services::project: there is no project state: dropping 127 buckets tags.project_key="ea659e59bc6a47c5a566f3b0772867c0"
pettysoldier commented 2 months ago

Can you try applying additional config on nginx from this PR? getsentry/self-hosted#3144

I tried it. Although the projectconfigs interface is no longer blocked, it is because code 503 is returned, but the reported events are still the same as before. As long as you disable DSN for a while and then enable it, you can report it within about half an hour success. Later, it failed to report successfully

hubertdeng123 commented 2 months ago

@pettysoldier Did you make this change manually? The changes in there haven't yet made it to the latest release. Otherwise, I don't have context here, so would need to transfer to relay.

pettysoldier commented 2 months ago

@pettysoldier Did you make this change manually? The changes in there haven't yet made it to the latest release. Otherwise, I don't have context here, so would need to transfer to relay.

yeah,I make the change manaully. My preliminary understanding is that relay blocks the sending of reported logs to kafka. When I disable and then enable DSN, it feels like the state has been reset。

Dav1dde commented 1 month ago

This is not a Relay issue, Relay reported in the logs that it tried to fetch the project config 69 times. Best to check your Sentry container logs and responses from Sentry.

As long as Relay does not receive the project config it will not forward any data, since it needs the project config for processing.

The deadline exceeded happens when the project config was pending for too long, again that needs to be checked within the Sentry container.

Additionally make sure your Redis instance is healthy and actually shared with Relay.

getsantry[bot] commented 3 weeks ago

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀