ivanfioravanti / chatbot-ollama

Chatbot Ollama is an open source chat UI for Ollama.
Other
1.33k stars 217 forks source link

timeout exception Error: failed to pipe response #42

Open tengzhexiao opened 4 months ago

tengzhexiao commented 4 months ago

when I try to response from ollama a few second, the error log:

⨯ Error: failed to pipe response 2024-03-03 21:28:21 at pipeToNodeResponse (/app/node_modules/next/dist/server/pipe-readable.js:111:15) 2024-03-03 21:28:21 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2024-03-03 21:28:21 at async NextNodeServer.runEdgeFunction (/app/node_modules/next/dist/server/next-server.js:1225:13) 2024-03-03 21:28:21 at async NextNodeServer.handleCatchallRenderRequest (/app/node_modules/next/dist/server/next-server.js:247:37) 2024-03-03 21:28:21 at async NextNodeServer.handleRequestImpl (/app/node_modules/next/dist/server/base-server.js:807:17) 2024-03-03 21:28:21 at async invokeRender (/app/node_modules/next/dist/server/lib/router-server.js:163:21) 2024-03-03 21:28:21 at async handleRequest (/app/node_modules/next/dist/server/lib/router-server.js:342:24) 2024-03-03 21:28:21 at async requestHandlerImpl (/app/node_modules/next/dist/server/lib/router-server.js:366:13) 2024-03-03 21:28:21 at async Server.requestListener (/app/node_modules/next/dist/server/lib/start-server.js:140:13) { 2024-03-03 21:28:21 [cause]: SyntaxError: Expected ',' or ']' after array element in JSON at position 1454 2024-03-03 21:28:21 at JSON.parse (<anonymous>) 2024-03-03 21:28:21 at Object.start (/app/.next/server/pages/api/chat.js:1:822) 2024-03-03 21:28:21 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2024-03-03 21:28:21 } 2024-03-03 21:28:21 Error: aborted 2024-03-03 21:28:21 at connResetException (node:internal/errors:787:14) 2024-03-03 21:28:21 at abortIncoming (node:_http_server:793:17) 2024-03-03 21:28:21 at socketOnClose (node:_http_server:787:3) 2024-03-03 21:28:21 at Socket.emit (node:events:530:35) 2024-03-03 21:28:21 at TCP.<anonymous> (node:net:337:12) { 2024-03-03 21:28:21 code: 'ECONNRESET' 2024-03-03 21:28:21 }

in ollama console every thing is all right.

daniiiol commented 4 months ago

I have the same issue here 👋

ivanfioravanti commented 4 months ago

I will check and keep you posted

guofeng63667 commented 4 months ago

the same issue

wenkeming commented 3 months ago
image

Same issue during chat, and there is no problem to geting the model list

damiencarrier commented 3 months ago

Same issue using windows 11 and pinokio installer: Start very often after at the end of first assistant generation.

✓ Ready in 6.3s ⨯ Error: failed to pipe response at pipeToNodeResponse (E:\IA\pinokio\api\chatbot-ollama.git\app\node_modules\next\dist\server\pipe-readable.js:111:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async NextNodeServer.runEdgeFunction (E:\IA\pinokio\api\chatbot-ollama.git\app\node_modules\next\dist\server\next-server.js:1225:13) at async NextNodeServer.handleCatchallRenderRequest (E:\IA\pinokio\api\chatbot-ollama.git\app\node_modules\next\dist\server\next-server.js:247:37) at async NextNodeServer.handleRequestImpl (E:\IA\pinokio\api\chatbot-ollama.git\app\node_modules\next\dist\server\base-server.js:807:17) at async invokeRender (E:\IA\pinokio\api\chatbot-ollama.git\app\node_modules\next\dist\server\lib\router-server.js:163:21) at async handleRequest (E:\IA\pinokio\api\chatbot-ollama.git\app\node_modules\next\dist\server\lib\router-server.js:342:24) at async requestHandlerImpl (E:\IA\pinokio\api\chatbot-ollama.git\app\node_modules\next\dist\server\lib\router-server.js:366:13) at async Server.requestListener (E:\IA\pinokio\api\chatbot-ollama.git\app\node_modules\next\dist\server\lib\start-server.js:140:13) { [cause]: SyntaxError: Expected ',' or ']' after array element in JSON at position 4090 at JSON.parse () at Object.start (E:\IA\pinokio\api\chatbot-ollama.git\app.next\server\pages\api\chat.js:1:822) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) } Error: aborted at connResetException (node:internal/errors:721:14) at abortIncoming (node:_http_server:793:17) at socketOnClose (node:_http_server:787:3) at Socket.emit (node:events:526:35) at TCP. (node:net:337:12) { code: 'ECONNRESET' }

ukorg-hash commented 2 weeks ago

I just encountered this same issue on unraid 6.12.10. After reboot it starts working again and hangs after some time. I did some testing to reproduce the hang but it feels to random. stop/starting the ollama and chatbot-ollama didn't have any effect.

 ⨯ Error: failed to pipe response
    at pipeToNodeResponse (/app/node_modules/next/dist/server/pipe-readable.js:111:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async NextNodeServer.runEdgeFunction (/app/node_modules/next/dist/server/next-server.js:1225:13)
    at async NextNodeServer.handleCatchallRenderRequest (/app/node_modules/next/dist/server/next-server.js:247:37)
    at async NextNodeServer.handleRequestImpl (/app/node_modules/next/dist/server/base-server.js:807:17)
    at async invokeRender (/app/node_modules/next/dist/server/lib/router-server.js:163:21)
    at async handleRequest (/app/node_modules/next/dist/server/lib/router-server.js:342:24)
    at async requestHandlerImpl (/app/node_modules/next/dist/server/lib/router-server.js:366:13)
    at async Server.requestListener (/app/node_modules/next/dist/server/lib/start-server.js:140:13) {
  [cause]: SyntaxError: Unexpected non-whitespace character after JSON at position 101
      at JSON.parse (<anonymous>)
      at Object.start (/app/.next/server/pages/api/chat.js:1:822)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
}
Error: aborted
    at abortIncoming (node:_http_server:794:17)
    at socketOnClose (node:_http_server:788:3)
    at Socket.emit (node:events:530:35)
    at TCP.<anonymous> (node:net:337:12) {
  code: 'ECONNRESET'
}

> chatbot-ollama@0.1.0 start
> next start

   ▲ Next.js 14.1.0
   - Local:        http://localhost:3000

 ✓ Ready in 354ms