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

HTTPError: 502 Bad Gateway from https://upload.pypi.org/legacy/ #9151

Closed
pavel-slama opened this issue Mar 1, 2021 · 17 comments
Closed

HTTPError: 502 Bad Gateway from https://upload.pypi.org/legacy/ #9151

pavel-slama opened this issue Mar 1, 2021 · 17 comments

Comments

@pavel-slama
Copy link

Pypi returns 502 error when uploading several packages via twine, test pypi works fine

Received "502: Bad Gateway" Package upload appears to have failed. Retry 5 of 5
Content received from server:

<title>502 Bad Gateway</title>

502 Bad Gateway


nginx/1.13.9

HTTPError: 502 Bad Gateway from https://upload.pypi.org/legacy/
Bad Gateway

@Innixma
Copy link

Innixma commented Mar 1, 2021

Same issue here, been experiencing for the past 1.5 hrs (also can confirm test pypi works fine).

I also notice going to https://upload.pypi.org/legacy/ , sometimes it shows correctly, and sometimes it shows 502 error.

I'm also seeing quite a few reports on https://downdetector.com/status/pypi/

According to https://pypi.org/ , the most recent uploaded package was 2 hours ago.

On https://test.pypi.org/ , it was under 1 minute ago.

I'm guessing nobody has been able to publish a package on pypi for the past 2 hours.

@casperdcl
Copy link
Contributor

Also does https://status.python.org incorrectly get formatted as if it's on a 150px wide screen for anyone else?

@busunkim96
Copy link

https://status.python.org still shows "partial outage" for "pypi.org - Backends" but some uploads seem to be making it through now. The latest releases lists multiple packages from the last five minutes.

@ewdurbin
Copy link
Member

ewdurbin commented Mar 1, 2021

Apologies. During the cleanup for a recent mass upload, our DB was inadvertently locked in such a way that uploads would fail while nearly all other events on the site were successful.

This was detected when our DB finally overflowed on sessions, and not sooner because the uploads endpoint "liveness" was broken in such a bizarre way (package upload times out due to DB lock up).

I've updated our monitoring to include an alert for "time since last upload" to catch these more subtle failures sooner.

@ewdurbin ewdurbin closed this as completed Mar 1, 2021
@jonathan-taylor
Copy link

Getting a similar message today. Any other possible cause?

@ad12
Copy link

ad12 commented Apr 25, 2023

+1

@di
Copy link
Member

di commented Apr 25, 2023

https://status.python.org/incidents/yxsssbp9zh0v

@itsbrex
Copy link

itsbrex commented Apr 25, 2023

Thanks @di. Been going in circles here with my ci action

@fjarri
Copy link

fjarri commented May 11, 2023

Happening again for me. Is there a procedure for reporting this?

Edit: worked through a VPN in another country (I'm the US).

@miketheman
Copy link
Member

@Wenzel
Copy link

Wenzel commented May 12, 2023

Also happened to me right now
image

@matan1008
Copy link

@niklassiemer
Copy link

It is happening again - https://status.python.org/incidents/z5wjvxhnscby tracks the current status.

@vietanhdev
Copy link

vietanhdev commented Jun 6, 2023

It is happening with me now - Vietnam.

@gferragu
Copy link

gferragu commented Jun 6, 2023

@niklassiemer, @vietanhdev, also just experienced this with PyPi and can confirm TestPyPi was working fine immediately beforehand.

@ghost
Copy link

ghost commented Jun 7, 2023

Currently having the same issue.

Enter your username: __token__
Enter your password: 
Uploading pikanetwork.py-0.0.1.tar.gz
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.2/6.2 kB • 00:00 • ?
WARNING  Received "502: Bad Gateway"
         Package upload appears to have failed. Retry 1 of 5.
Uploading pikanetwork.py-0.0.1.tar.gz
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.2/6.2 kB • 00:00 • ?
WARNING  Received "502: Bad Gateway"
         Package upload appears to have failed. Retry 2 of 5.
Uploading pikanetwork.py-0.0.1.tar.gz
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.2/6.2 kB • 00:00 • ?
WARNING  Received "502: Bad Gateway"
         Package upload appears to have failed. Retry 3 of 5.
Uploading pikanetwork.py-0.0.1.tar.gz
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.2/6.2 kB • 00:00 • ?
WARNING  Received "502: Bad Gateway"
         Package upload appears to have failed. Retry 4 of 5.
Uploading pikanetwork.py-0.0.1.tar.gz
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.2/6.2 kB • 00:00 • ?
WARNING  Received "502: Bad Gateway"
         Package upload appears to have failed. Retry 5 of 5.
WARNING  Error during upload. Retry with the --verbose option for more details.
ERROR    HTTPError: 502 Bad Gateway from https://upload.pypi.org/legacy/
         Bad Gateway

@ewdurbin
Copy link
Member

ewdurbin commented Jun 7, 2023

The recent issues in the past 48 hours have been due to a backfill script running that was causing lock contention in the DB. I've dropped the batch size on this task to reduce the impact.

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