Skip to content

Commit c5ca70d

Browse files
authored
fix: Starlette dependency issue (#456)
* update max_file_size to spool_max_size * update
1 parent ec10c15 commit c5ca70d

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
fastapi >=0.100
22
uvicorn[standard] >=0.29.0
33
pyzmq >=22.0.0
4-
starlette<0.46.0 # TODO: fix root cause for buffer error
4+
starlette

src/litserve/loops/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
logger = logging.getLogger(__name__)
3333
# FastAPI writes form files to disk over 1MB by default, which prevents serialization by multiprocessing
3434
MultiPartParser.max_file_size = sys.maxsize
35+
# renamed in PR: https://github.com/encode/starlette/pull/2780
36+
MultiPartParser.spool_max_size = sys.maxsize
3537

3638

3739
def _inject_context(context: Union[List[dict], dict], func, *args, **kwargs):

src/litserve/server.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656

5757
# FastAPI writes form files to disk over 1MB by default, which prevents serialization by multiprocessing
5858
MultiPartParser.max_file_size = sys.maxsize
59+
# renamed in PR: https://github.com/encode/starlette/pull/2780
60+
MultiPartParser.spool_max_size = sys.maxsize
5961

6062

6163
def no_auth():

0 commit comments

Comments
 (0)