question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
scottinetcommented, Aug 5, 2020

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.

1reaction
scottinetcommented, Jul 21, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found