Redis Insights failing after some time

Hello, I started Redis Insight on Linux machine via systemd service:

[Unit]
Description=Redis Insight
After=syslog.target
After=network.target

[Service]
Type=simple
User=app
Group=app
ExecStart=/srv/redis-insight/redisinsight-linux64
SuccessExitStatus=143
WorkingDirectory=/srv/redis-insight
Restart=on-failure
KillMode=control-group
KillSignal=SIGTERM
SendSIGKILL=true
TimeoutSec=60

Environment="RIPORT=8001"
Environment="RIHOST=localhost"
Environment="RIHOMEDIR=/srv/redis-insight"
Environment="RILOGDIR=/var/log/redis-insight"

[Install]

Everything works OK, but after some period of time (like 1 month) it starts failing:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "waitress/channel.py", line 349, in service
  File "waitress/task.py", line 169, in service
  File "waitress/task.py", line 439, in execute
  File "django/core/handlers/wsgi.py", line 141, in __call__
  File "django/core/handlers/base.py", line 75, in get_response
  File "django/core/handlers/exception.py", line 36, in inner
  File "django/core/handlers/exception.py", line 95, in response_for_exception
  File "django/utils/log.py", line 228, in log_response
  File "logging/__init__.py", line 1337, in error
  File "logging/__init__.py", line 1444, in _log
  File "logging/__init__.py", line 1454, in handle
  File "logging/__init__.py", line 1516, in callHandlers
  File "logging/__init__.py", line 865, in handle
  File "django/utils/log.py", line 120, in emit
  File "django/views/debug.py", line 338, in get_traceback_text
  File "pathlib.py", line 1183, in open
  File "pathlib.py", line 1037, in _opener
  File "pathlib.py", line 387, in wrapped
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/_MEIUt1qu3/django/views/templates/technical_500.txt'

I suppose this is because it stores FE files to /tmp storage, should I change somehow location of this files?

Thank you,

Marek

Hi Marek,

It looks like some process regularly deletes all temporary files. We will look into this to find a solution and get back to you.

Olga

Hi Olga, systemd-tmpfiles is cleanning /tmp directory after some time of unusing files. Tmp dir is not the best one for storing lasting files. Best solution is to change location somehow, maybe use var RIHOMEDIR or create a new property and export it as env var. Thank you, Marek

@olopaci any news in this ticket?

Still waiting for some reply, issue still persist in latest version of Redis Insights

Hey @Marek, Can you try with the below build.

Do let us know of the result.

Thanks

Hello,

yes there are no static files in tmp folder now. Looks like this wokrs. One question where are located this files now? I didnt find this files on filesystem.

Thank you,

Marek

@Marek

The files are now located in /var/tmp since the files can be persisted and might be preserved over reboot on Linux.

@gnanesh
I can confirm that files are locate there. When you merge this change?

@Marek

We are doing some regression tests and might merge only if there are no issues else we will delay until we find the solutions to the issues.

AFAIK, till now, we didn’t come across any issues. But until this get merged, happy to provide a build for releases.