Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Not found any messages saved in Redis when change adapter driver to redis #1170

Open
anhdam-arent3d opened this issue May 4, 2024 · 0 comments
Assignees
Labels
status:triage Awaiting triage.

Comments

@anhdam-arent3d
Copy link

anhdam-arent3d commented May 4, 2024

Description
My system occasionally freezes, causing Soketi to stop sending messages even though Laravel has sent them to Soketi. I switched the adapter driver to Redis, but whether the system freezes or not, I don't see any messages in Redis. Am I misunderstanding the purpose of the adapter? Is there a way to fix this issue?

CleanShot 2024-05-04 at 09 41 14@2x

Reproduction steps
Steps to reproduce the behavior:

  1. Change 'adapter.driver' => 'redis'

Expected behavior
Message will be saved to redis database

Screenshots
CleanShot 2024-05-04 at 09 44 52@2x

Environment

  • Soketi version (i.e. 1.3.0): latest
  • Adapter (local, redis): redis
  • App Manager (array, mysql, postgres, dynamodb) : array
  • Queue (sqs, redis, sync): sync
  • Cache Managers (memory, redis): memory

Configuration
Run the server with SOKETI_DEBUG=1 and paste the nested object configuration that outputs:

{
  adapter: {
    driver: 'redis',
    redis: {
      requestsTimeout: 5000,
      prefix: '',
      redisPubOptions: {},
      redisSubOptions: {},
      clusterMode: false
    },
    cluster: { requestsTimeout: 5000 },
    nats: {
      requestsTimeout: 5000,
      prefix: '',
      servers: [ '127.0.0.1:4222' ],
      user: null,
      pass: null,
      token: null,
      timeout: 10000,
      nodesNumber: null
    }
  },
  appManager: {
    driver: 'array',
    cache: { enabled: false, ttl: -1 },
    array: {
      apps: [
        {
          id: 'xxxx',
          key: 'xx',
          secret: 'xxx=',
          enableUserAuthentication: true
        }
      ]
    },
    dynamodb: { table: 'apps', region: 'us-east-1', endpoint: null },
    mysql: { table: 'apps', version: '8.0', useMysql2: false },
    postgres: { table: 'apps', version: '13.3' }
  },
  cache: { driver: 'memory', redis: { redisOptions: {}, clusterMode: false } },
  channelLimits: { maxNameLength: 200, cacheTtl: 3600 },
  cluster: {
    hostname: '0.0.0.0',
    helloInterval: 500,
    checkInterval: 500,
    nodeTimeout: 2000,
    masterTimeout: 2000,
    port: 11002,
    prefix: '',
    ignoreProcess: true,
    broadcast: '255.255.255.255',
    unicast: null,
    multicast: null
  },
  cors: {
    credentials: true,
    origin: [ '*' ],
    methods: [ 'GET', 'POST', 'PUT', 'DELETE', 'OPTIONS' ],
    allowedHeaders: [
      'Origin',
      'Content-Type',
      'X-Auth-Token',
      'X-Requested-With',
      'Accept',
      'Authorization',
      'X-CSRF-TOKEN',
      'XSRF-TOKEN',
      'X-Socket-Id'
    ]
  },
  database: {
    mysql: {
      host: '127.0.0.1',
      port: 3306,
      user: 'root',
      password: 'password',
      database: 'main'
    },
    postgres: {
      host: '127.0.0.1',
      port: 5432,
      user: 'postgres',
      password: 'password',
      database: 'main'
    },
    redis: {
      host: 'redis',
      port: 6379,
      db: 0,
      username: null,
      password: null,
      keyPrefix: '',
      sentinels: null,
      sentinelPassword: null,
      name: 'mymaster',
      clusterNodes: []
    }
  },
  databasePooling: { enabled: false, min: 0, max: 7 },
  debug: true,
  eventLimits: {
    maxChannelsAtOnce: 100,
    maxNameLength: 200,
    maxPayloadInKb: 100,
    maxBatchSize: 10
  },
  host: '0.0.0.0',
  httpApi: { requestLimitInMb: 100, acceptTraffic: { memoryThreshold: 85 } },
  instance: { process_id: 15838 },
  metrics: {
    enabled: true,
    driver: 'prometheus',
    host: '0.0.0.0',
    prometheus: { prefix: 'soketi_' },
    port: 9601
  },
  mode: 'full',
  port: 6001,
  pathPrefix: '',
  presence: { maxMembersPerChannel: 100, maxMemberSizeInKb: 2 },
  queue: {
    driver: 'sync',
    redis: { concurrency: 1, redisOptions: {}, clusterMode: false },
    sqs: {
      region: 'us-east-1',
      endpoint: null,
      clientOptions: {},
      consumerOptions: {},
      queueUrl: '',
      processBatch: false,
      batchSize: 1,
      pollingWaitTimeMs: 0
    }
  },
  rateLimiter: { driver: 'local', redis: { redisOptions: {}, clusterMode: false } },
  shutdownGracePeriod: 3000,
  ssl: { certPath: '', keyPath: '', passphrase: '', caPath: '' },
  userAuthenticationTimeout: 30000,
  webhooks: { batching: { enabled: false, duration: 50 } }
}
  📡 soketi initialization....
   Initializing the HTTP API & Websockets Server...
   Initializing the Websocket listeners and channels...
   Initializing the HTTP webserver...
  🕵️‍♂️ Initiating metrics endpoints...

   🎉 Server is up and running!
   📡 The Websockets server is available at 127.0.0.1:6001
   🔗 The HTTP API server is available at http://127.0.0.1:6001
   🎊 The /usage endpoint is available on port 9601.
   🌠 Prometheus /metrics endpoint is available on port 9601.

(node:15838) NOTE: The AWS SDK for JavaScript (v2) will enter maintenance mode
on September 8, 2024 and reach end-of-support on September 8, 2025.

Please migrate your code to use AWS SDK for JavaScript (v3).
For more information, check blog post at https://a.co/cUPnyil
(Use `node --trace-warnings ...` to show where the warning was created)
   [Sat May 04 2024 02:01:28 GMT+0000 (Coordinated Universal Time)] Promoted from node to master.
{
  isMaster: true,
  isMasterEligible: true,
  weight: -0.1714788087869,
  address: '127.0.0.1',
  advertisement: undefined
}
@anhdam-arent3d anhdam-arent3d added the status:triage Awaiting triage. label May 4, 2024
@anhdam-arent3d anhdam-arent3d changed the title [BUG] [BUG] Not found any messages saved in Redis when change adapter driver to redis May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:triage Awaiting triage.
Development

No branches or pull requests

2 participants