kuzzle: Insert big document get [Error: Unable to connect to kuzzle server at 192.168.0.146:7512]

This is my dockerfile:

version: '3.7'

services:

  kuzzle:
    image: kuzzleio/kuzzle:2.3.2 #latest #2.1.0
    ports:
      - "7512:7512"
    cap_add:
      - SYS_PTRACE
    sysctls:
      - net.core.somaxconn=8192
    depends_on:
      - redis
      - elasticsearch
    environment:
      - kuzzle_services__storageEngine__client__node=http://elasticsearch:9200
      - kuzzle_services__internalCache__node__host=redis
      - kuzzle_services__memoryStorage__node__host=redis
      - kuzzle_server__protocols__mqtt__enabled=true
      - NODE_ENV=production
      - kuzzle_limits__documentsWriteCount=3000000000
      - kuzzle_server__maxRequestSize=300mb
      - kuzzle_protocols__http__maxFormFileSize=300mb

  redis:
    image: redis:5 #latest

  elasticsearch:
    image: kuzzleio/elasticsearch:7.4.0 #kuzzleio/elasticsearch:latest
    ulimits:
      nofile: 65536
    environment:
      - cluster.name=kuzzle
      - "ES_JAVA_OPTS=-Xms2048m -Xmx2048m"

When i try to do a big request with javascript sdk:

const response = await kuzzle.document.createOrReplace(
            'uploaded_diary',
            'diary',
            _id,
            Diary
          );

where Diary is about 20mb i get this error: [Error: Unable to connect to kuzzle server at 192.168.0.146:7512]

if Diary is smaller about 14mb it works fine.

is set kuzzle_server__maxRequestSize=300mb why the request is refused?

Expected Behavior

kuzzle insert the document into elastic search

Current Behavior

kuzzle send back the error [Error: Unable to connect to kuzzle server at 192.168.0.146:7512]

Thanks

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (9 by maintainers)

Most upvoted comments

You’re right, I missed those lines. I even said that the logs don’t show them… My apologies.

The logs show that the server received a “close” event for that connection, but it can be for various reasons.

I’ve submitted a PR allowing the debug output to show why a connection has been closed. (https://github.com/kuzzleio/kuzzle/pull/1744)

I cannot test it myself, since I’m still unable to reproduce the problem. So I’ll come back to you once it’s merged, so you can test again using our development docker image. Hopefully this should help understanding that issue.

I’ll take a look this week if I can find the time, next week at the latest.