azure function app, model4 , TimeTrigger for node

Gerth Wang 20 Reputation points
2023-08-25T07:02:56.52+00:00

function app configuration

CleanShot 2023-08-25 at 14.52.22

Log

2023-08-25T06:57:05Z   [Verbose]   Handling WorkerErrorEvent for runtime:node, workerId:node. Failed with: Microsoft.Azure.WebJobs.Script.Workers.WorkerProcessExitException: node exited with code 1 (0x1)
 ---> System.Exception: LanguageWorkerConsoleLog[error] Worker uncaught exception (learn more: https://go.microsoft.com/fwlink/?linkid=2097909 ): Error: Connection timeout     at TLSSocket.<anonymous> (/home/site/wwwroot/node_modules/@redis/client/dist/lib/client/socket.js:178:124)     at Object.onceWrapper (node:events:628:28)     at TLSSocket.emit (node:events:514:28)     at Socket._onTimeout (node:net:571:8)     at listOnTimeout (node:internal/timers:569:17)     at process.processTimers (node:internal/timers:512:7)
   --- End of inner exception stack trace ---
2023-08-25T06:57:05Z   [Verbose]   Attempting to dispose webhost or jobhost channel for workerId: 'a14a0d4e-b921-4eb3-b110-672a8d3b0e7c', runtime: 'node'
2023-08-25T06:57:05Z   [Verbose]   Disposing language worker channel with id:a14a0d4e-b921-4eb3-b110-672a8d3b0e7c
2023-08-25T06:57:05Z   [Verbose]   Disposed language worker channel with id:a14a0d4e-b921-4eb3-b110-672a8d3b0e7c
2023-08-25T06:57:05Z   [Verbose]   No initialized worker channels for runtime 'node'. Delaying future invocations
2023-08-25T06:57:05Z   [Verbose]   Restarting worker channel for runtime: 'node'
2023-08-25T06:57:06Z   [Verbose]   Adding jobhost language worker channel for runtime: node. workerId:93e3a64f-9cc9-46f6-b9d3-192de961d568

function rediso connect config

  const redisClient = REDIS.createClient({
    url: `rediss://${redisDB.fullUrl}`,
    password: `${redisDB.password}`,
    tls: {
      rejectUnauthorized: false
    }
  });
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,192 questions
{count} votes

Accepted answer
  1. Mike Urnun 9,636 Reputation points Microsoft Employee
    2023-08-29T03:24:43.8333333+00:00

    Are you deploying to Consumption SKU? Since the Inner Exception that’s causing the NodeJS worker to shutdown is TLS Timeout, I’m wondering if you may be encountering a similar threading-related problem described in the following post: https://dev.to/tehmas/why-redis-cache-times-out-in-azure-function-app-on-consumption-plan-a-journey-4o4j

    On a side note though, could you expand on your use case with the Time Trigger? Do you necessarily need to create Redis connections at time intervals? Azure Functions does have an event-based Redis Trigger which might work better: Overview of Azure functions for Azure Cache for Redis (preview)

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful