#community-help

ECONNRESET error on Typesense cloud

TLDR Masahiro was encountering connectivity issues in Typesense cloud, leading to "ECONNRESET" errors. After investigating and providing their cluster ID and endpoint to Jason, it was discovered that they set the wrong protocol in client initialization was wrong. The error was resolved.

Powered by Struct AI

1

Apr 21, 2021 (34 months ago)
Masahiro
Photo of md5-366dff6b5f9b1a7d0f404fdc3261e573
Masahiro
03:25 PM
Request #1619018557157: Request to Node 0 failed due to "ECONNRESET socket hang up"
Request #1619018557157: Sleeping for 0.1s and then retrying request...
Request #1619018557157: Request to Node 0 failed due to "ECONNRESET socket hang up"
Request #1619018557157: Sleeping for 0.1s and then retrying request...
{ Error: socket hang up
at createHangUpError (_http_client.js:332:15)
at Socket.socketOnEnd (_http_client.js:435:23)
at Socket.emit (events.js:203:15)
at Socket.EventEmitter.emit (domain.js:448:20)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
code: 'ECONNRESET',
I got this error in Typesense cloud, any workarounds??
Thanks!
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
03:35 PM
Looking into this
03:36
Jason
03:36 PM
Masahiro Could you give me the cluster ID?
03:39
Jason
03:39 PM
Also, may I know what API endpoint you called when you saw this timeout?
Masahiro
Photo of md5-366dff6b5f9b1a7d0f404fdc3261e573
Masahiro
09:57 PM
Here is my cluster ID
gxu1iajypedl2z0tp
09:59
Masahiro
09:59 PM
in JS SDK,
• client.collections().create(usersCollection);
• client.collections(‘users’).documents().create(userData)
10:14
Masahiro
10:14 PM
I got this kind of error once. My implementation might be wrong😂
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
11:13 PM
Hmm, I don't see any errors in the logs on that cluster. Could it be a client-side connectivity issue, especially if you only saw it once?

1

Apr 22, 2021 (34 months ago)
Masahiro
Photo of md5-366dff6b5f9b1a7d0f404fdc3261e573
Masahiro
02:30 AM
myCollection = {
        'name': 'books',
        'fields': [
          {'name': 'id', 'type': 'string'},
          {'name': 'title', 'type': 'string' },
          {'name': 'publication_year', 'type': 'int32' },
        ],
        'default_sorting_field': 'publication_year'
      };
      
      try{
        await client.collections().create(myCollection);
      }catch(e){
          console.log(e);  
            }
02:31
Masahiro
02:31 AM
Request #1619058629397: Request to Node 0 failed due to "ENOTFOUND getaddrinfo ENOTFOUND  "
Request #1619058629397: Sleeping for 0.1s and then retrying request...
Request #1619058629397: Request to Node 0 failed due to "ENOTFOUND getaddrinfo ENOTFOUND  "
Request #1619058629397: Sleeping for 0.1s and then retrying request...
{ Error: getaddrinfo ENOTFOUND  
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:56:26)
  errno: 'ENOTFOUND',
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: '',
  host: '',
  port: '443',
  config:
   { url:
      '',
     method: 'post',
     data:
      '{"name":"books","fields":[{"name":"id","type":"string"},{"name":"title","type":"string"},{"name":"publication_year","type":"int32"}],"default_sorting_field":"publication_year"}',
     headers:
      { Accept: 'application/json, text/plain, */*',
02:35
Masahiro
02:35 AM
I finally figure out.
client initialization was wrong.
not http, https
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
02:35 AM
Ah ok! 😅
02:36
Jason
02:36 AM
Btw, in the above stack trace, cluster id tsmguza3k7b4vqh9p was terminated, so it's not an active cluster
Masahiro
Photo of md5-366dff6b5f9b1a7d0f404fdc3261e573
Masahiro
03:26 AM
Yes, thanks 😁

Typesense

Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI

Indexed 3015 threads (79% resolved)

Join Our Community

Similar Threads

Resolve Connection Error on Records Upsert

Jainil faced consistent connection errors while upserting records. Jason identified an OOM issue, suggesting a capacity upgrade. Auto-scaling was discussed and the upgrade implementation process, which was in progress, was clarified.

1

11
3mo

Troubleshooting Typesense Cluster Multi-node Leadership Error

Bill experienced a problem with a new typesense cluster, receiving an error about no leader and health status issues. Jason and Kishore Nallan provided troubleshooting steps and determined it was likely due to a communication issue between nodes. Kishore Nallan identified a potential solution involving resetting the data directory. Following this, Bill reported the error resolved.

45
24mo

Typesense Error in Unit Testing for Python

Mehdi was encountering errors while running unit tests for Typesense functionalities in Python. Through discussion with Kishore Nallan, they recognized resource constraints might be causing the issue during JSONL file import. As suggested by Kishore Nallan, adding a short sleep after the import resolved the problem.

17
23mo

Unresolved High-Volume Write Issue in Typesense

Greg experienced issues with Typesense where it became unresponsive during high-volume write operations. Jason and Kishore Nallan suggested several solutions, but the issue remained unresolved. They suspect that the problem occurs when concurrent writes are happening to the same collection.

2

43
2d

Debugging and Recovery of a Stuck Typesense Cluster

Charlie had a wedged staging cluster. Jason provided debugging and recovery steps, and Adrian helped with more insights. It turns out the issue was insufficient disk space. Once Adrian increased the disk size, the cluster healed itself.

6

55
4mo