Skip to content

h11._util.RemoteProtocolError: illegal header line: bytearray(b'Cookie: \ #4230

@MayankFawkes

Description

@MayankFawkes

First Check

  • I added a very descriptive title to this issue.
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the FastAPI documentation, with the integrated search.
  • I already searched in Google "How to X in FastAPI" and didn't find any information.
  • I already read and followed all the tutorial in the docs and didn't find an answer.
  • I already checked if it is not related to FastAPI but to Pydantic.
  • I already checked if it is not related to FastAPI but to Swagger UI.
  • I already checked if it is not related to FastAPI but to ReDoc.

Commit to Help

  • I commit to help with one of those options 👆

Example Code

sys.argv = [
			"gunicorn",
			"--preload",
			"-b", f"0.0.0.0:{port}",
			"--threads", str(multiprocessing.cpu_count()),
			"-w", str((multiprocessing.cpu_count()*2)+1),
			"--max-requests", "1000",
			"--max-requests-jitter", "50",
			"-k", " uvicorn.workers.UvicornH11Worker",
			"--keep-alive", "0",
			"main:app",
		]


### Description

i am using gunicorn with ``uvicorn.workers.UvicornH11Worker`` and keep getting the error
i found a lot solutions and non worked for me
i am using digital ocean 


### Operating System

Linux

### Operating System Details

OS: Ubuntu 20.04LTS
Python 3.8.10
Fastapi 0.70.0
Uvicorn 0.14.0
Gunicorn 20.1.0

### FastAPI Version

0.70.0

### Python Version

3.8.10

### Additional Context

![image](https://user-images.githubusercontent.com/43340190/144101577-5ca7c89e-23bc-445b-97f4-3b7b1edb9d32.png)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions