CommunitySolidServer / CommunitySolidServer

An open and modular implementation of the Solid specifications
https://communitysolidserver.github.io/CommunitySolidServer/
MIT License
526 stars 125 forks source link

Server doesn't start when using configuration with redis locker with a Maximum call stack size exceeded error. #1892

Closed argahsuknesib closed 1 month ago

argahsuknesib commented 7 months ago

Environment

Description

I am using CSS Server with the Redis locker which I start with the following command.

community-solid-server -b http://n061-14a.wall2.ilabt.iminds.be:3000  --config config-redis.json -f ./data/ --seededPodConfigJson account.json -w 0

the configuration of my CSS is,

{
  "@context": "https://linkedsoftwaredependencies.org/bundles/npm/@solid/community-server/^6.0.0/components/context.jsonld",
  "import": [
    "css:config/app/init/default.json",
    "css:config/app/main/default.json",
    "css:config/app/setup/disabled.json",
    "css:config/app/variables/default.json",
    "css:config/http/handler/default.json",
    "css:config/http/middleware/default.json",
    "css:config/http/notifications/webhooks.json",
    "css:config/http/server-factory/http.json",
    "css:config/http/static/default.json",
    "css:config/identity/access/public.json",
    "css:config/identity/email/default.json",
    "css:config/identity/handler/default.json",
    "css:config/identity/ownership/token.json",
    "css:config/identity/pod/static.json",
    "css:config/identity/registration/enabled.json",
    "css:config/ldp/authentication/dpop-bearer.json",
    "css:config/ldp/authorization/allow-all.json",
    "css:config/ldp/handler/default.json",
    "css:config/ldp/metadata-parser/default.json",
    "css:config/ldp/metadata-writer/default.json",
    "css:config/ldp/modes/default.json",
    "css:config/storage/backend/file.json",
    "css:config/storage/key-value/resource-store.json",
    "css:config/storage/middleware/default.json",
    "css:config/util/auxiliary/empty.json",
    "css:config/util/identifiers/suffix.json",
    "css:config/util/index/default.json",
    "css:config/util/logging/winston.json",
    "css:config/util/representation-conversion/default.json",
    "css:config/util/resource-locker/redis.json",
    "css:config/util/variables/default.json"
  ],
  "@graph": [
    {
      "comment": "The new expiration time for inactive locks, in milliseconds.",
      "@type": "Override",
      "overrideInstance": {
        "@id": "urn:solid-server:default:ResourceLocker"
      },
      "overrideParameters": {
        "@type": "WrappedExpiringReadWriteLocker",
        "expiration": 18000000
      }
    }
  ]
}

When starting the server, I get the following error.

2024-04-19T10:19:27.598Z [Components.js] info: Loaded configs
2024-04-19T10:19:29.577Z [AppRunner] {Primary} error: Could not start the server: Maximum call stack size exceeded
Could not start the server
Cause: Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
    at RedisLocker.clearLocks (/usr/local/lib/node_modules/@solid/community-server/dist/util/locking/RedisLocker.js:171:32)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async SequenceHandler.handle (/usr/local/lib/node_modules/@solid/community-server/dist/util/handlers/SequenceHandler.js:27:26)   
    at async SequenceHandler.handle (/usr/local/lib/node_modules/@solid/community-server/dist/util/handlers/SequenceHandler.js:27:26)   
    at async SequenceHandler.handle (/usr/local/lib/node_modules/@solid/community-server/dist/util/handlers/SequenceHandler.js:27:26)   
    at async App.start (/usr/local/lib/node_modules/@solid/community-server/dist/init/App.js:17:9)
    at async AppRunner.runCli (/usr/local/lib/node_modules/@solid/community-server/dist/init/AppRunner.js:128:13)

This issue is due to the ioredis library where other people have encountered similar issues, but they have resolved it and closed the issue. However, people still face the issue. The link to the issue is here

argahsuknesib commented 7 months ago

somehow the issue disappers when I restarted the machine.

argahsuknesib commented 1 month ago

Hello, reran to this issue and it doesn't disappear when restarting the machine so not sure what is wrong.

argahsuknesib commented 1 month ago

Closing the issue again as the issue was resolved when using FLUSHALL in the redis-cli