fedora-copr / copr

RPM build system - upstream for https://copr.fedorainfracloud.org/
115 stars 58 forks source link

500 errors in Packit #3372

Open FrostyX opened 4 weeks ago

FrostyX commented 4 weeks ago

Reported by @majamassarini in https://github.com/fedora-copr/copr/pull/3329#issuecomment-2288099204

I was thinking that probably we should open an issue for this. I hoped it was somehow related to the above fix but sadly it isn't. I looked in our logs and what catches me is that we got 500 errors from COPR in the last 7 days just in a bunch of projects and the exceptions are scattered all along the period of time; so I would say it does not depend on an high volume of requests or high load in the COPR service.

2024-08-13T13:42:03 https://github.com/containers/podman/pull/23601 2024-08-10T09:39:55 https://github.com/containers/podman/pull/23569 2024-08-12T13:29:25 https://github.com/containers/podman/pull/23581 2024-08-12T15:38:41 https://github.com/containers/podman/pull/23587 2024-08-07T14:38:59 https://github.com/containers/podman/pull/23537

2024-08-13T16:26:09 https://github.com/containers/common/pull/2124 2024-08-09T23:14:02 https://github.com/containers/common/pull/2119

2024-08-08T00:58:49 https://github.com/containers/crun/pull/1513 2024-08-12T17:50:45 https://github.com/containers/crun/pull/1519 2024-08-12T21:16:54 https://github.com/containers/crun/pull/1520

2024-08-10T00:08:19 https://github.com/containers/buildah/pull/5680 2024-08-12T19:43:26 https://github.com/containers/buildah/pull/5681 2024-08-12T20:15:48 https://github.com/containers/buildah/pull/5682

2024-08-11T14:02:53 https://github.com/containers/netavark/pull/1052

2024-08-13T10:50:34 https://github.com/rpm-software-management/dnf5/pull/1625

2024-08-08T11:29:19 https://github.com/cockpit-project/cockpit-machines/pull/1760 2024-08-11T19:30:25 https://github.com/cockpit-project/cockpit-machines/pull/1761 2024-08-12T03:47:41 https://github.com/cockpit-project/cockpit-machines/pull/1762

The containers projects and the cockpit-machines project both use the packages key. With the packages key I would expect more requests from Packit to COPR in a short period of time in comparison to other Packit projects. I could be wrong, but to me it looks like a race condition on the COPR side. Also because this does not happen always on the same PR, thus, probably, it is not the data we submit to COPR.

The dnf5 project, instead, has the most simple packit config we could find and nevertheless has been hit by this problem. I can explain it again just with some kind of race condition...

I can't spot anything else interesting in our logs but let us know if we can help you in some way debugging it.

praiskup commented 4 weeks ago

Last 6 hours nothing suspicious. One of the events mentioned above created this traceback: log.txt

[Tue Aug 13 10:50:32.041388 2024] [wsgi:error] [pid 3866555:tid 3866782] [remote 107.20.230.14:21570] psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "copr_name_for_user_uniq"
[Tue Aug 13 10:50:32.041400 2024] [wsgi:error] [pid 3866555:tid 3866782] [remote 107.20.230.14:21570] DETAIL:  Key (user_id, name)=(5576, rpm-software-management-dnf5-1625) already exists.
mcrha commented 3 weeks ago

Trying to open https://download.copr.fedorainfracloud.org/results/mcrha or https://download.copr.fedorainfracloud.org/results/rpmsoftwaremanagement/ leads to:

504 ERROR
The request could not be satisfied.
CloudFront attempted to establish a connection with the origin, but either the attempt failed or the origin closed the connection. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.

Generated by cloudfront (CloudFront)
Request ID: qb8C5Vsx7ySyHQaTIpUS5n-x2e_Q4qHumkAWoTo2f1ApQVW_IWDKig==

Is this anyhow related to this issue or I may file a new one, please?

praiskup commented 3 weeks ago

@mcrha thank you for reporting that! Wes we had copr-backend issues yesterday, sorry for the inconvenience (should be working OK now). The problem discussed here is in copr-frontend.rpm (different VM).

mcrha commented 3 weeks ago

Aha, I see, different thing then. I'm sorry for the noise. You are right, it cured on itself an hour or so after I wrote a note here.

majamassarini commented 2 weeks ago

@FrostyX , @praiskup I was quickly checking the last occurrences of this exception on the Packit side and I saw that this happened last time on August the 22nd around 10AM. I don't know if you have done something that could have solved the problem? Or maybe the projects that trigger this exception are just on vacation ^_^. I don't think something has changed on the Packit side on Thursday the 22nd (we release packit service on Tuesday).