This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Status 502: [WARNING] Invalid HTTP request received. #680
Comments
Not sure how to help without a minimum example, maybe you can try to hit
your endpoint with ab or wrk and get reproducibility?
Le mar. 5 nov. 2019 à 7:25 AM, gautamsinghania95 <notifications@github.com>
a écrit :
… I was trying to build a typeahead search API. This API gets called in
quick succession, and I am getting an intermittent 502 response.
*To Reproduce*
Not sure how to reproduce this, as normal API calls, when spaced out, are
working fine.
*Expected behavior - Logs*
2019-11-05T06:17:55.447961016Z [2019-11-05 06:17:55 +0000] [16] [INFO] ('100.96.0.56', 50964) - "POST <<URL_NAME>> HTTP/1.1" 200
*Noted Intermittent Behaviour - Logs*
2019-11-05T06:17:56.459601437Z [2019-11-05 06:17:56 +0000] [16] [WARNING] Invalid HTTP request received.
*Environment:*
- OS: Debian GNU/Linux 10 (buster)
- FastAPI Version : 0.38.1
- Python version: 3.6
- Server: Gunicorn with 2 Uvicorn workers (see config file below)
bind = "0.0.0.0:4000"
workers = 2
worker_class = "uvicorn.workers.UvicornWorker"
timeout = 300
*Additional context*
- Added timeout in config after searching on the internet, did not work
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#680?email_source=notifications&email_token=AAINSPUEFVDANXRABQ2TEODQSEGWJA5CNFSM4JI6FYKKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HWZQLVA>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAINSPVFFABQU2ZPFAQ77KTQSEGWJANCNFSM4JI6FYKA>
.
|
Hi!! This is an issue with the deployed version of the app. I have tried to reproduce the problem in my local environment, but to no effect. Please see if you can help in some other fashion. Thanks! |
Hi, Closing the issue as it was resolved from my end. Resolution: The deployment platform only accepted HTTP 1.1 calls, but the uvicorn worker class I was using Thanks. |
glad you solved it, for reference which plateform is it and by |
Thanks for the help here @euri10 ! 👏 🙇 Thanks for reporting back and closing the issue @gautamsinghania95 👍 |
@gautamsinghania95 sorry but can you give more information on how to do that? I have the same issue as you and can't seem to find how to change uvicorn.workers.UvicornWorker Thanks in advance edit: nevermind, I found it |
According to tiangolo/uvicorn-gunicorn-docker#38, you can set it as an environment variable now |
I had this issue as well, the issue was that I was trying to access with HTTPS instead of HTTP. |
Hi, I'm getting the same error, could you explain how you solved it? I used Caddy which auto issues https :/ |
This not work for me, have you found any other solutions guys?
|
Assuming the original need was handled, this will be automatically closed now. But feel free to add more comments or create new issues or PRs. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
I was trying to build a typeahead search API. This API gets called in quick succession, and I am getting an intermittent 502 response.
To Reproduce
Not sure how to reproduce this, as normal API calls, when spaced out, are working fine.
Expected behavior - Logs
Noted Intermittent Behaviour - Logs
Environment:
Additional context
The text was updated successfully, but these errors were encountered: