Debugging "ECONNABORTED Timeout" Issue in Typesense Configuration
TLDR GM encountered an "ECONNABORTED timeout" error using their company account with their typesense configuration. Jason is assisting in troubleshooting, suspecting that environment variables might not be set correctly.
1
1
Oct 25, 2022 (14 months ago)
GM
06:25 PMGM
06:25 PMGM
06:25 PMJason
06:26 PMGM
06:26 PMq: '*',
query_by: 'ADDRESS_CITY',
filter_by: 'COORDINATES:(' + latitude + ',' + longitude + ', ' + radious + ')',
};
const results = await typesense.collections('sitesnew').documents().search(searchParameters);
return results;
Jason
06:26 PMtypesense
object?GM
06:26 PMGM
06:27 PMnodes: [
{
host: env('TYPESENSE_URL') as string,
port: Number(env('TYPESENSE_PORT') as string),
protocol: env('TYPESENSE_MODE') as string,
} as NodeConfiguration,
],
apiKey: env('TYPESENSE_APIKEY') as string,
numRetries: 3, // A total of 4 tries (1 original try + 3 retries)
connectionTimeoutSeconds: 120, // Set a longer timeout for large imports
} as ConfigurationOptions);
Jason
06:28 PMGM
06:28 PMt6lsx4ydznkc9wqvp-1.a1.typesense.net [https:443]
GM
06:34 PMGM
06:34 PMJason
06:35 PMnodes: [
{
host: env('TYPESENSE_URL') as string,
port: Number(env('TYPESENSE_PORT') as string),
protocol: env('TYPESENSE_MODE') as string,
} as NodeConfiguration,
],
Jason
06:35 PM1
Jason
06:35 PMGM
06:37 PM"TYPESENSE_URL": "t6lsx4ydznkc9wqvp-1.a1.typesense.net",
"TYPESENSE_PORT": 443,
"TYPESENSE_MODE": "https"
GM
06:40 PMJason
06:40 PMBut I wonder if you do
env('TYPESENSE_URL')
it’s not picking up the value in the env file?GM
06:42 PMJason
06:42 PMGM
06:42 PM[2022-10-25T18:32:33.706Z] Client {
[2022-10-25T18:32:33.706Z] configuration: Configuration {
[2022-10-25T18:32:33.706Z] nodes: [ [Object] ],
[2022-10-25T18:32:33.706Z] nearestNode: null,
[2022-10-25T18:32:33.706Z] connectionTimeoutSeconds: 120,
[2022-10-25T18:32:33.706Z] healthcheckIntervalSeconds: 60,
[2022-10-25T18:32:33.706Z] numRetries: 3,
[2022-10-25T18:32:33.707Z] retryIntervalSeconds: 0.1,
[2022-10-25T18:32:33.707Z] apiKey: '*',
[2022-10-25T18:32:33.707Z] sendApiKeyAsQueryParam: false,
[2022-10-25T18:32:33.707Z] cacheSearchResultsForSeconds: 0,
[2022-10-25T18:32:33.707Z] useServerSideSearchCache: false,
[2022-10-25T18:32:33.708Z] logger: {
[2022-10-25T18:32:33.708Z] name: [Getter],
[2022-10-25T18:32:33.708Z] levels: [Getter],
[2022-10-25T18:32:33.708Z] methodFactory: [Getter],
[2022-10-25T18:32:33.709Z] getLevel: [Getter],
[2022-10-25T18:32:33.709Z] setLevel: [Getter],
[2022-10-25T18:32:33.709Z] setDefaultLevel: [Getter],
[2022-10-25T18:32:33.709Z] resetLevel: [Getter],
[2022-10-25T18:32:33.710Z] enableAll: [Getter],
[2022-10-25T18:32:33.710Z] disableAll: [Getter],
[2022-10-25T18:32:33.710Z] trace: [Getter],
[2022-10-25T18:32:33.710Z] debug: [Getter],
[2022-10-25T18:32:33.710Z] info: [Getter],
[2022-10-25T18:32:33.710Z] warn: [Getter],
[2022-10-25T18:32:33.711Z] error: [Getter],
[2022-10-25T18:32:33.711Z] log: [Getter],
[2022-10-25T18:32:33.711Z] getLogger: [Getter],
[2022-10-25T18:32:33.712Z] noConflict: [Getter],
[2022-10-25T18:32:33.712Z] getLoggers: [Getter],
[2022-10-25T18:32:33.712Z] default: [Logger]
[2022-10-25T18:32:33.712Z] },
[2022-10-25T18:32:33.712Z] logLevel: 'warn',
[2022-10-25T18:32:33.713Z] additionalHeaders: undefined
[2022-10-25T18:32:33.713Z] },
[2022-10-25T18:32:33.713Z] apiCall: ApiCall {
[2022-10-25T18:32:33.713Z] configuration: Configuration {
[2022-10-25T18:32:33.713Z] nodes: [Array],
[2022-10-25T18:32:33.713Z] nearestNode: null,
[2022-10-25T18:32:33.714Z] connectionTimeoutSeconds: 120,
[2022-10-25T18:32:33.714Z] healthcheckIntervalSeconds: 60,
[2022-10-25T18:32:33.714Z] numRetries: 3,
[2022-10-25T18:32:33.714Z] retryIntervalSeconds: 0.1,
[2022-10-25T18:32:33.714Z] apiKey: '*',
[2022-10-25T18:32:33.714Z] sendApiKeyAsQueryParam: false,
[2022-10-25T18:32:33.715Z] cacheSearchResultsForSeconds: 0,
[2022-10-25T18:32:33.715Z] useServerSideSearchCache: false,
[2022-10-25T18:32:33.715Z] logger: [Object],
[2022-10-25T18:32:33.715Z] logLevel: 'warn',
[2022-10-25T18:32:33.716Z] additionalHeaders: undefined
[2022-10-25T18:32:33.716Z] },
[2022-10-25T18:32:33.716Z] apiKey: '*',
[2022-10-25T18:32:33.716Z] nodes: [ [Object] ],
[2022-10-25T18:32:33.716Z] nearestNode: null,
[2022-10-25T18:32:33.716Z] connectionTimeoutSeconds: 120,
[2022-10-25T18:32:33.717Z] healthcheckIntervalSeconds: 60,
[2022-10-25T18:32:33.717Z] numRetriesPerRequest: 3,
[2022-10-25T18:32:33.717Z] retryIntervalSeconds: 0.1,
[2022-10-25T18:32:33.717Z] sendApiKeyAsQueryParam: false,
[2022-10-25T18:32:33.717Z] additionalUserHeaders: undefined,
[2022-10-25T18:32:33.717Z] logger: {
[2022-10-25T18:32:33.718Z] name: [Getter],
[2022-10-25T18:32:33.718Z] levels: [Getter],
[2022-10-25T18:32:33.718Z] methodFactory: [Getter],
[2022-10-25T18:32:33.718Z] getLevel: [Getter],
[2022-10-25T18:32:33.719Z] setLevel: [Getter],
[2022-10-25T18:32:33.719Z] setDefaultLevel: [Getter],
[2022-10-25T18:32:33.719Z] resetLevel: [Getter],
[2022-10-25T18:32:33.719Z] enableAll: [Getter],
[2022-10-25T18:32:33.719Z] disableAll: [Getter],
[2022-10-25T18:32:33.720Z] trace: [Getter],
[2022-10-25T18:32:33.720Z] debug: [Getter],
[2022-10-25T18:32:33.720Z] info: [Getter],
[2022-10-25T18:32:33.720Z] warn: [Getter],
[2022-10-25T18:32:33.721Z] error: [Getter],
[2022-10-25T18:32:33.721Z] log: [Getter],
[2022-10-25T18:32:33.721Z] getLogger: [Getter],
[2022-10-25T18:32:33.722Z] noConflict: [Getter],
[2022-10-25T18:32:33.722Z] getLoggers: [Getter],
[2022-10-25T18:32:33.722Z] default: [Logger]
[2022-10-25T18:32:33.722Z] },
[2022-10-25T18:32:33.723Z] currentNodeIndex: -1
[2022-10-25T18:32:33.723Z] },
[2022-10-25T18:32:33.723Z] debug: Debug {
[2022-10-25T18:32:33.723Z] apiCall: ApiCall {
[2022-10-25T18:32:33.723Z] configuration: [Configuration],
[2022-10-25T18:32:33.723Z] apiKey: '*',
[2022-10-25T18:32:33.723Z] nodes: [Array],
[2022-10-25T18:32:33.723Z] nearestNode: null,
[2022-10-25T18:32:33.724Z] connectionTimeoutSeconds: 120,
[2022-10-25T18:32:33.724Z] healthcheckIntervalSeconds: 60,
[2022-10-25T18:32:33.724Z] numRetriesPerRequest: 3,
[2022-10-25T18:32:33.724Z] retryIntervalSeconds: 0.1,
[2022-10-25T18:32:33.724Z] sendApiKeyAsQueryParam: false,
[2022-10-25T18:32:33.724Z] additionalUserHeaders: undefined,
[2022-10-25T18:32:33.724Z] logger: [Object],
[2022-10-25T18:32:33.724Z] currentNodeIndex: -1
[2022-10-25T18:32:33.724Z] }
[2022-10-25T18:32:33.724Z] },
[2022-10-25T18:32:33.724Z] metrics: Metrics {
[2022-10-25T18:32:33.724Z] apiCall: ApiCall {
[2022-10-25T18:32:33.724Z] configuration: [Configuration],
[2022-10-25T18:32:33.724Z] apiKey: '*',
[2022-10-25T18:32:33.725Z] nodes: [Array],
[2022-10-25T18:32:33.725Z] nearestNode: null,
[2022-10-25T18:32:33.725Z] connectionTimeoutSeconds: 120,
[2022-10-25T18:32:33.725Z] healthcheckIntervalSeconds: 60,
[2022-10-25T18:32:33.725Z] numRetriesPerRequest: 3,
[2022-10-25T18:32:33.725Z] retryIntervalSeconds: 0.1,
[2022-10-25T18:32:33.726Z] sendApiKeyAsQueryParam: false,
[2022-10-25T18:32:33.726Z] additionalUserHeaders: undefined,
[2022-10-25T18:32:33.726Z] logger: [Object],
[2022-10-25T18:32:33.726Z] currentNodeIndex: -1
[2022-10-25T18:32:33.726Z] }
[2022-10-25T18:32:33.726Z] },
[2022-10-25T18:32:33.726Z] health: Health {
[2022-10-25T18:32:33.727Z] apiCall: ApiCall {
[2022-10-25T18:32:33.727Z] configuration: [Configuration],
[2022-10-25T18:32:33.727Z] apiKey: '*',
[2022-10-25T18:32:33.727Z] nodes: [Array],
[2022-10-25T18:32:33.727Z] nearestNode: null,
[2022-10-25T18:32:33.727Z] connectionTimeoutSeconds: 120,
[2022-10-25T18:32:33.727Z] healthcheckIntervalSeconds: 60,
[2022-10-25T18:32:33.727Z] numRetriesPerRequest: 3,
[2022-10-25T18:32:33.727Z] retryIntervalSeconds: 0.1,
[2022-10-25T18:32:33.727Z] sendApiKeyAsQueryParam: false,
[2022-10-25T18:32:33.728Z] additionalUserHeaders: undefined,
[2022-10-25T18:32:33.728Z] logger: [Object],
GM
06:42 PM[2022-10-25T18:32:33.728Z] }
[2022-10-25T18:32:33.728Z] },
[2022-10-25T18:32:33.728Z] operations: Operations {
[2022-10-25T18:32:33.729Z] apiCall: ApiCall {
[2022-10-25T18:32:33.729Z] configuration: [Configuration],
[2022-10-25T18:32:33.729Z] apiKey: '*',
[2022-10-25T18:32:33.729Z] nodes: [Array],
[2022-10-25T18:32:33.729Z] nearestNode: null,
[2022-10-25T18:32:33.729Z] connectionTimeoutSeconds: 120,
[2022-10-25T18:32:33.729Z] healthcheckIntervalSeconds: 60,
[2022-10-25T18:32:33.730Z] numRetriesPerRequest: 3,
[2022-10-25T18:32:33.730Z] retryIntervalSeconds: 0.1,
[2022-10-25T18:32:33.730Z] sendApiKeyAsQueryParam: false,
[2022-10-25T18:32:33.730Z] additionalUserHeaders: undefined,
[2022-10-25T18:32:33.730Z] logger: [Object],
[2022-10-25T18:32:33.730Z] currentNodeIndex: -1
[2022-10-25T18:32:33.730Z] }
[2022-10-25T18:32:33.731Z] },
[2022-10-25T18:32:33.731Z] multiSearch: MultiSearch {
[2022-10-25T18:32:33.731Z] apiCall: ApiCall {
[2022-10-25T18:32:33.731Z] configuration: [Configuration],
[2022-10-25T18:32:33.731Z] apiKey: '*',
[2022-10-25T18:32:33.732Z] nodes: [Array],
[2022-10-25T18:32:33.732Z] nearestNode: null,
[2022-10-25T18:32:33.732Z] connectionTimeoutSeconds: 120,
[2022-10-25T18:32:33.733Z] healthcheckIntervalSeconds: 60,
[2022-10-25T18:32:33.733Z] numRetriesPerRequest: 3,
[2022-10-25T18:32:33.733Z] retryIntervalSeconds: 0.1,
[2022-10-25T18:32:33.734Z] sendApiKeyAsQueryParam: false,
[2022-10-25T18:32:33.734Z] additionalUserHeaders: undefined,
[2022-10-25T18:32:33.734Z] logger: [Object],
[2022-10-25T18:32:33.734Z] currentNodeIndex: -1
[2022-10-25T18:32:33.734Z] },
[2022-10-25T18:32:33.734Z] configuration: Configuration {
[2022-10-25T18:32:33.735Z] nodes: [Array],
[2022-10-25T18:32:33.735Z] nearestNode: null,
[2022-10-25T18:32:33.735Z] connectionTimeoutSeconds: 120,
[2022-10-25T18:32:33.735Z] healthcheckIntervalSeconds: 60,
[2022-10-25T18:32:33.735Z] numRetries: 3,
[2022-10-25T18:32:33.736Z] retryIntervalSeconds: 0.1,
[2022-10-25T18:32:33.736Z] apiKey: '*',
[2022-10-25T18:32:33.736Z] sendApiKeyAsQueryParam: false,
[2022-10-25T18:32:33.736Z] cacheSearchResultsForSeconds: 0,
[2022-10-25T18:32:33.736Z] useServerSideSearchCache: false,
[2022-10-25T18:32:33.736Z] logger: [Object],
[2022-10-25T18:32:33.736Z] logLevel: 'warn',
[2022-10-25T18:32:33.737Z] additionalHeaders: undefined
[2022-10-25T18:32:33.737Z] },
[2022-10-25T18:32:33.737Z] useTextContentType: false,
[2022-10-25T18:32:33.737Z] requestWithCache: RequestWithCache { responseCache: Map(0) {} }
[2022-10-25T18:32:33.738Z] },
[2022-10-25T18:32:33.738Z] _collections: Collections {
[2022-10-25T18:32:33.738Z] apiCall: ApiCall {
[2022-10-25T18:32:33.738Z] configuration: [Configuration],
[2022-10-25T18:32:33.738Z] apiKey: '*',
[2022-10-25T18:32:33.739Z] nodes: [Array],
[2022-10-25T18:32:33.739Z] nearestNode: null,
[2022-10-25T18:32:33.739Z] connectionTimeoutSeconds: 120,
[2022-10-25T18:32:33.739Z] Received FunctionInvocationRequest
[2022-10-25T18:32:33.739Z] healthcheckIntervalSeconds: 60,
[2022-10-25T18:32:33.740Z] numRetriesPerRequest: 3,
[2022-10-25T18:32:33.741Z] retryIntervalSeconds: 0.1,
[2022-10-25T18:32:33.741Z] sendApiKeyAsQueryParam: false,
[2022-10-25T18:32:33.741Z] additionalUserHeaders: undefined,
[2022-10-25T18:32:33.741Z] logger: [Object],
[2022-10-25T18:32:33.741Z] currentNodeIndex: -1
[2022-10-25T18:32:33.741Z] }
[2022-10-25T18:32:33.741Z] },
[2022-10-25T18:32:33.742Z] individualCollections: {},
[2022-10-25T18:32:33.742Z] _aliases: Aliases {
[2022-10-25T18:32:33.742Z] apiCall: ApiCall {
[2022-10-25T18:32:33.742Z] configuration: [Configuration],
[2022-10-25T18:32:33.742Z] apiKey: '*',
[2022-10-25T18:32:33.743Z] nodes: [Array],
[2022-10-25T18:32:33.743Z] nearestNode: null,
[2022-10-25T18:32:33.743Z] connectionTimeoutSeconds: 120,
[2022-10-25T18:32:33.743Z] healthcheckIntervalSeconds: 60,
[2022-10-25T18:32:33.743Z] numRetriesPerRequest: 3,
[2022-10-25T18:32:33.743Z] retryIntervalSeconds: 0.1,
[2022-10-25T18:32:33.744Z] sendApiKeyAsQueryParam: false,
[2022-10-25T18:32:33.744Z] additionalUserHeaders: undefined,
[2022-10-25T18:32:33.744Z] logger: [Object],
[2022-10-25T18:32:33.744Z] currentNodeIndex: -1
[2022-10-25T18:32:33.745Z] }
[2022-10-25T18:32:33.745Z] },
[2022-10-25T18:32:33.745Z] individualAliases: {},
[2022-10-25T18:32:33.745Z] _keys: Keys {
[2022-10-25T18:32:33.745Z] apiCall: ApiCall {
[2022-10-25T18:32:33.746Z] configuration: [Configuration],
[2022-10-25T18:32:33.746Z] apiKey: '*',
[2022-10-25T18:32:33.746Z] nodes: [Array],
[2022-10-25T18:32:33.746Z] nearestNode: null,
[2022-10-25T18:32:33.746Z] connectionTimeoutSeconds: 120,
[2022-10-25T18:32:33.746Z] healthcheckIntervalSeconds: 60,
[2022-10-25T18:32:33.746Z] numRetriesPerRequest: 3,
[2022-10-25T18:32:33.747Z] retryIntervalSeconds: 0.1,
[2022-10-25T18:32:33.747Z] sendApiKeyAsQueryParam: false,
[2022-10-25T18:32:33.747Z] additionalUserHeaders: undefined,
[2022-10-25T18:32:33.747Z] logger: [Object],
[2022-10-25T18:32:33.747Z] currentNodeIndex: -1
[2022-10-25T18:32:33.748Z] }
[2022-10-25T18:32:33.748Z] },
[2022-10-25T18:32:33.748Z] individualKeys: {}
[2022-10-25T18:32:33.748Z] }
Jason
06:43 PMtypesense.configuration
?Jason
06:43 PMconsole.log(JSON.stringify(typesense.configuration))
Jason
06:44 PM1
GM
06:47 PM[2022-10-25T18:45:33.280Z] Configuration {
[2022-10-25T18:45:33.280Z] nodes: [
[2022-10-25T18:45:33.280Z] {
[2022-10-25T18:45:33.281Z] host: 't6lsx4ydznkc9wqvp-1.a1.typesense.net',
[2022-10-25T18:45:33.281Z] port: 443,
[2022-10-25T18:45:33.281Z] protocol: 'https',
[2022-10-25T18:45:33.281Z] path: ''
[2022-10-25T18:45:33.281Z] }
[2022-10-25T18:45:33.281Z] ],
[2022-10-25T18:45:33.281Z] nearestNode: null,
[2022-10-25T18:45:33.282Z] connectionTimeoutSeconds: 120,
[2022-10-25T18:45:33.282Z] healthcheckIntervalSeconds: 60,
[2022-10-25T18:45:33.282Z] numRetries: 3,
[2022-10-25T18:45:33.282Z] retryIntervalSeconds: 0.1,
[2022-10-25T18:45:33.283Z] apiKey: '**',
[2022-10-25T18:45:33.283Z] sendApiKeyAsQueryParam: false,
[2022-10-25T18:45:33.284Z] cacheSearchResultsForSeconds: 0,
[2022-10-25T18:45:33.284Z] useServerSideSearchCache: false,
[2022-10-25T18:45:33.284Z] logger: {
[2022-10-25T18:45:33.285Z] name: [Getter],
[2022-10-25T18:45:33.286Z] levels: [Getter],
[2022-10-25T18:45:33.286Z] methodFactory: [Getter],
[2022-10-25T18:45:33.287Z] getLevel: [Getter],
[2022-10-25T18:45:33.288Z] setLevel: [Getter],
[2022-10-25T18:45:33.288Z] setDefaultLevel: [Getter],
[2022-10-25T18:45:33.288Z] resetLevel: [Getter],
[2022-10-25T18:45:33.289Z] enableAll: [Getter],
[2022-10-25T18:45:33.289Z] disableAll: [Getter],
[2022-10-25T18:45:33.289Z] trace: [Getter],
[2022-10-25T18:45:33.290Z] debug: [Getter],
[2022-10-25T18:45:33.290Z] info: [Getter],
[2022-10-25T18:45:33.290Z] warn: [Getter],
[2022-10-25T18:45:33.291Z] error: [Getter],
[2022-10-25T18:45:33.291Z] log: [Getter],
[2022-10-25T18:45:33.291Z] getLogger: [Getter],
[2022-10-25T18:45:33.291Z] noConflict: [Getter],
[2022-10-25T18:45:33.292Z] getLoggers: [Getter],
[2022-10-25T18:45:33.292Z] default: <ref *1> Logger {
[2022-10-25T18:45:33.292Z] name: undefined,
[2022-10-25T18:45:33.293Z] levels: [Object],
[2022-10-25T18:45:33.293Z] methodFactory: [Function: defaultMethodFactory],
[2022-10-25T18:45:33.293Z] getLevel: [Function (anonymous)],
[2022-10-25T18:45:33.293Z] setLevel: [Function (anonymous)],
[2022-10-25T18:45:33.293Z] setDefaultLevel: [Function (anonymous)],
[2022-10-25T18:45:33.293Z] resetLevel: [Function (anonymous)],
[2022-10-25T18:45:33.294Z] enableAll: [Function (anonymous)],
[2022-10-25T18:45:33.294Z] disableAll: [Function (anonymous)],
[2022-10-25T18:45:33.295Z] trace: [Function: noop],
[2022-10-25T18:45:33.295Z] debug: [Function: noop],
[2022-10-25T18:45:33.295Z] info: [Function: noop],
[2022-10-25T18:45:33.295Z] warn: [Function: bound warn],
[2022-10-25T18:45:33.296Z] error: [Function: bound error],
[2022-10-25T18:45:33.296Z] log: [Function: noop],
[2022-10-25T18:45:33.296Z] getLogger: [Function: getLogger],
[2022-10-25T18:45:33.296Z] noConflict: [Function (anonymous)],
[2022-10-25T18:45:33.297Z] getLoggers: [Function: getLoggers],
[2022-10-25T18:45:33.297Z] default: [Circular *1]
[2022-10-25T18:45:33.297Z] }
[2022-10-25T18:45:33.298Z] },
[2022-10-25T18:45:33.298Z] logLevel: 'warn',
[2022-10-25T18:45:33.298Z] additionalHeaders: undefined
[2022-10-25T18:45:33.298Z] }
[2022-10-25T18:45:33.321Z] Received FunctionInvocationRequest
Typesense
Indexed 3015 threads (79% resolved)
Similar Threads
Troubleshooting TypeScript Error with Typesense
GM experienced an error with Typesense in TypeScript, requiring help to correct the issues. Jason helped propose solutions and adjustments to the code. Ultimately, they were able to resolve the errors and successfully implement a search function.
Debugging Search Issue with Typesense Server Caching
Jameshwart reported experiencing caching issues with typesense server, despite the server's default setting of not caching. Through troubleshooting steps with Kishore Nallan, they were able to confirm an issue with the Typesense Javascript client and resolved it by adding `cacheSearchResultsForSeconds: 0` after `apiKey` in the initialisation. Laura also participated in discussion, learning about server and client level caching.
Typesense Capabilities and Troubleshooting Queries
A had issues with refinement lists and analytics in Typesense. Jason provided a possible solution and recommended the analytics widget. They clarified import size limits and helped identify a filter issue in A's query. Upgrade options are in Typesense's roadmap.
Querying with Not-in in Typesense
Masahiro inquired about using not-in queries in Typesense. Kishore Nallan explained how to conduct such queries by using the "-" operator in the query string, and assisted Masahiro with issues stemming from a high number of exclusion tokens. The problem was eventually resolved by switching to the `multi_search` endpoint.
Troubleshooting Typesense Docsearch Scraper Setup Issue
Vinicius experienced issues setting up typesense-docsearch-scraper locally. Jason identified a misconfiguration with the Typesense server after checking the .env file, and recommended using ngrok or port forwarding for development purposes. Vinicius successfully resolved the issue with port forwarding.