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

HeadersTimeoutError: Headers Timeout Error (5 minutes) #4224

Open
denizekiz opened this issue Dec 30, 2024 · 2 comments
Open

HeadersTimeoutError: Headers Timeout Error (5 minutes) #4224

denizekiz opened this issue Dec 30, 2024 · 2 comments
Labels
ai/core bug Something isn't working

Comments

@denizekiz
Copy link

Description

generateText function timeout after 5 minutes using local ollama server. Adding abortsignal option to generateText doesn't solved the issue.

Logs:

time=2024-12-30T12:58:37.344+03:00 level=INFO source=server.go:700 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:58:37 | 500 | 5m0s | 192.168.1.11 | POST "/api/chat"
[GIN] 2024/12/30 - 12:58:37 | 500 | 5m1s | 192.168.1.11 | POST "/api/chat"
time=2024-12-30T12:58:37.820+03:00 level=INFO source=runner.go:664 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:58:38 | 500 | 5m1s | 192.168.1.11 | POST "/api/chat"
time=2024-12-30T12:58:38.238+03:00 level=INFO source=server.go:700 msg="aborting completion request due to client closing the connection"
time=2024-12-30T12:58:38.320+03:00 level=INFO source=runner.go:664 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:58:38 | 500 | 5m1s | 192.168.1.11 | POST "/api/chat"
[GIN] 2024/12/30 - 12:58:39 | 500 | 5m1s | 192.168.1.11 | POST "/api/chat"
time=2024-12-30T12:58:40.237+03:00 level=INFO source=runner.go:664 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:58:40 | 500 | 5m1s | 192.168.1.11 | POST "/api/chat"
time=2024-12-30T12:58:40.819+03:00 level=INFO source=server.go:700 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:58:40 | 500 | 5m0s | 192.168.1.11 | POST "/api/chat"
[GIN] 2024/12/30 - 12:58:41 | 500 | 5m1s | 192.168.1.11 | POST "/api/chat"
time=2024-12-30T12:58:41.818+03:00 level=INFO source=runner.go:664 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:58:41 | 500 | 5m1s | 192.168.1.11 | POST "/api/chat"
[GIN] 2024/12/30 - 12:58:42 | 500 | 5m1s | 192.168.1.11 | POST "/api/chat"
time=2024-12-30T12:58:42.775+03:00 level=INFO source=runner.go:664 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:58:44 | 500 | 5m1s | 192.168.1.11 | POST "/api/chat"
[GIN] 2024/12/30 - 12:58:46 | 500 | 5m0s | 192.168.1.11 | POST "/api/chat"
time=2024-12-30T12:58:46.315+03:00 level=INFO source=runner.go:664 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:58:50 | 500 | 5m0s | 192.168.1.11 | POST "/api/chat"
time=2024-12-30T12:58:53.941+03:00 level=INFO source=server.go:700 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:58:53 | 500 | 5m1s | 192.168.1.11 | POST "/api/chat"
[GIN] 2024/12/30 - 12:58:53 | 500 | 5m1s | 192.168.1.11 | POST "/api/chat"
time=2024-12-30T12:58:53.941+03:00 level=INFO source=runner.go:664 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:58:55 | 500 | 5m2s | 192.168.1.11 | POST "/api/chat"
time=2024-12-30T12:58:55.940+03:00 level=INFO source=runner.go:664 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:58:59 | 500 | 5m3s | 192.168.1.11 | POST "/api/chat"
[GIN] 2024/12/30 - 12:59:00 | 500 | 5m3s | 192.168.1.11 | POST "/api/chat"
time=2024-12-30T12:59:00.397+03:00 level=INFO source=runner.go:664 msg="aborting completion request due to client closing the connection"
time=2024-12-30T12:59:01.304+03:00 level=INFO source=server.go:700 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:59:01 | 500 | 5m0s | 192.168.1.11 | POST "/api/chat"
time=2024-12-30T12:59:01.397+03:00 level=INFO source=runner.go:664 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:59:01 | 500 | 5m3s | 192.168.1.11 | POST "/api/chat"
time=2024-12-30T12:59:04.802+03:00 level=INFO source=server.go:700 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:59:04 | 500 | 5m0s | 192.168.1.11 | POST "/api/chat"
time=2024-12-30T12:59:05.301+03:00 level=INFO source=server.go:700 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:59:05 | 500 | 5m0s | 192.168.1.11 | POST "/api/chat"
[GIN] 2024/12/30 - 12:59:06 | 500 | 5m3s | 192.168.1.11 | POST "/api/chat"
[GIN] 2024/12/30 - 12:59:08 | 500 | 5m0s | 192.168.1.11 | POST "/api/chat"
time=2024-12-30T12:59:12.391+03:00 level=INFO source=server.go:700 msg="aborting completion request due to client closing the connection"
time=2024-12-30T12:59:12.391+03:00 level=INFO source=server.go:700 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:59:12 | 500 | 5m3s | 192.168.1.11 | POST "/api/chat"
[GIN] 2024/12/30 - 12:59:12 | 500 | 5m3s | 192.168.1.11 | POST "/api/chat"
[GIN] 2024/12/30 - 12:59:12 | 500 | 5m4s | 192.168.1.11 | POST "/api/chat"
time=2024-12-30T12:59:13.891+03:00 level=INFO source=runner.go:664 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:59:13 | 500 | 5m3s | 192.168.1.11 | POST "/api/chat"
time=2024-12-30T12:59:14.793+03:00 level=INFO source=server.go:700 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:59:14 | 500 | 5m0s | 192.168.1.11 | POST "/api/chat"
time=2024-12-30T12:59:14.890+03:00 level=INFO source=server.go:700 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:59:14 | 500 | 5m3s | 192.168.1.11 | POST "/api/chat"
[GIN] 2024/12/30 - 12:59:15 | 500 | 5m4s | 192.168.1.11 | POST "/api/chat"
[GIN] 2024/12/30 - 12:59:18 | 500 | 5m4s | 192.168.1.11 | POST "/api/chat"
time=2024-12-30T12:59:18.417+03:00 level=INFO source=server.go:700 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:59:18 | 500 | 5m4s | 192.168.1.11 | POST "/api/chat"
time=2024-12-30T12:59:19.436+03:00 level=INFO source=runner.go:664 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:59:19 | 500 | 5m3s | 192.168.1.11 | POST "/api/chat"
time=2024-12-30T12:59:20.789+03:00 level=INFO source=server.go:700 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:59:20 | 500 | 5m0s | 192.168.1.11 | POST "/api/chat"
[GIN] 2024/12/30 - 12:59:21 | 500 | 5m4s | 192.168.1.11 | POST "/api/chat"
[GIN] 2024/12/30 - 12:59:25 | 500 | 5m4s | 192.168.1.11 | POST "/api/chat"
time=2024-12-30T12:59:28.481+03:00 level=INFO source=server.go:700 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:59:28 | 500 | 5m3s | 192.168.1.11 | POST "/api/chat"
time=2024-12-30T12:59:28.982+03:00 level=INFO source=server.go:700 msg="aborting completion request due to client closing the connection"
time=2024-12-30T12:59:28.982+03:00 level=INFO source=server.go:700 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:59:28 | 500 | 5m3s | 192.168.1.11 | POST "/api/chat"
[GIN] 2024/12/30 - 12:59:28 | 500 | 5m3s | 192.168.1.11 | POST "/api/chat"
[GIN] 2024/12/30 - 12:59:29 | 500 | 5m4s | 192.168.1.11 | POST "/api/chat"
[GIN] 2024/12/30 - 12:59:32 | 500 | 5m4s | 192.168.1.11 | POST "/api/chat"
[GIN] 2024/12/30 - 12:59:33 | 500 | 5m3s | 192.168.1.11 | POST "/api/chat"
time=2024-12-30T12:59:33.976+03:00 level=INFO source=runner.go:664 msg="aborting completion request due to client closing the connection"
time=2024-12-30T12:59:35.475+03:00 level=INFO source=server.go:700 msg="aborting completion request due to client closing the connection"
[GIN] 2024/12/30 - 12:59:35 | 500 | 5m3s | 192.168.1.11 | POST "/api/chat"

Code example

No response

AI provider

No response

Additional context

No response

@denizekiz denizekiz added the bug Something isn't working label Dec 30, 2024
@lgrammel
Copy link
Collaborator

lgrammel commented Jan 6, 2025

What environment are you using the AI SDK in? e.g. Chrome has a default timeout of 300 seconds (5 min).

@denizekiz
Copy link
Author

Node.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai/core bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants