signal-cli-rest-api icon indicating copy to clipboard operation
signal-cli-rest-api copied to clipboard

Signal-cli-rest-api container creates temporary SQLITE_DB files in the node that consumes disk space

Open jphasha opened this issue 9 months ago • 4 comments

The problem

The files below tend to pile up in any one of the folders in this directory "/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/". e.g. "/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/182/fs/tmp/". The pile up in a short space of time which require the container to be restarted frequently in order to deal with the pile up. What causes these files? why are they piling up rapidly? what is the best solution that doe not involve having to restart the container all the time or having to manually delete them?

Image

Are you using the latest released version?

  • [x] Yes

Have you read the troubleshooting page?

  • [x] Yes

What type of installation are you running?

signal-cli-rest-api Docker Container

In which mode are you using the docker container?

Normal Mode

What's the architecture of your host system?

x86-64

Additional information

Restarting the container removes this problem but this is not sustainable.

jphasha avatar Apr 11 '25 15:04 jphasha

I had the same problem. I was able to fix the error by increasing the interval at which the Signal CLI Rest API is requested. So not polling the API so often. You can also see this in the output from Signal-CLI. If you poll too quickly, you get log messages saying that it is locked. A new libsqlitejdbc.so and libsqlitejdbc.so.lck file and a folder are created each time.

jumo-sballing avatar Apr 14 '25 20:04 jumo-sballing

If you do not need to/want to query the REST API receive endpoints manually, I'd suggest to switch to the json-rpc mode.I haven't verified that yet, but I think that should also reduce the number of files

bbernhard avatar Apr 14 '25 22:04 bbernhard

That looks like a very good alternative. But I need a little bit help. I know the JSON-RPC protocol and I'm also able to use Websockets. I understand that I have to use /v1/receive to connect to the RPC-Websocket when using the json-rpc mode. But how to use the JSON-RPC Websocket? Should I call a special method to receive messages or is there a event to subscribe to? Do you have an example?

jumo-sballing avatar Apr 15 '25 07:04 jumo-sballing

Oh... I got it. I only have to connect to ws:///v1/receive/{number} and the websocket sends every new signal message as plain json. Thats easy. Thank you very much for that.

jumo-sballing avatar Apr 15 '25 07:04 jumo-sballing