Skip to content

Requests over ~4 KB hang for 30 s and return 500 (stale lf_toolkit pin) #11

Description

@peterbjohnson

The pinned lf_toolkit commit truncates IPC messages at 4096 bytes, so the Python worker never receives a complete request and never replies. Shimmy gives up after 30 s.

Impact: any evaluation with more than roughly 45 notes fails. The platform sends response/answer as JSON strings, so most real pieces exceed the limit. This affects the deployed staging function today.

Reproduce

docker run -d --name compare-music -p 9000:8080 <image>
# body with ~100 notes
curl -X POST http://localhost:9000/ -H "content-type: application/json" -H "command: eval" -d @big_body.json
# -> HTTP 500 {"error":{"message":"error sending rpc request: context deadline exceeded"}} after 30 s

Cause: NewlineStreamIO.read() in lf_toolkit/io/stream_io.py stopped at the size hint (4096) instead of reading to the newline delimiter.

Fix: upstream fixed this in lambda-feedback/toolkit-python#10 (19 Aug 2026). poetry.lock pins commit 8a687d3 from 29 Jul 2026, before the fix. Run poetry update lf_toolkit and commit the lock.

Verified locally: after the bump, a 289-note request returns in 0.14 s.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions