jonaswinkler / paperless-ng

A supercharged version of paperless: scan, index and archive all your physical documents
https://paperless-ng.readthedocs.io/en/latest/
GNU General Public License v3.0
5.38k stars 354 forks source link

Redis Error 104 - Connection reset by peer #543

Closed agreenfield1 closed 3 years ago

agreenfield1 commented 3 years ago

Imports and the hourly classifier training task are failing due to this error with redis. Using docker-compose for everything.

07:51:28 [Q] INFO Process-1 created a task from schedule [Train the classifier]
07:51:28 [Q] INFO Process-1:2 processing [gee-connecticut-november-friend]
07:51:36 [Q] ERROR Failed [gee-connecticut-november-friend] - Error 104 while writing to socket. Connection reset by peer. : Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/django_redis/cache.py", line 27, in _decorator
    return method(self, *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/django_redis/cache.py", line 76, in set
    return self.client.set(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/django_redis/client/default.py", line 166, in set
    raise ConnectionInterrupted(connection=client) from e
django_redis.exceptions.ConnectionInterrupted: Redis ConnectionError: Error 104 while writing to socket. Connection reset by peer.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/django_q/cluster.py", line 436, in worker
    res = f(*task["args"], **task["kwargs"])
  File "/usr/src/paperless/src/documents/tasks.py", line 44, in train_classifier
    classifier = load_classifier()
  File "/usr/src/paperless/src/documents/classifier.py", line 43, in load_classifier
    version=version, timeout=86400)
  File "/usr/local/lib/python3.7/site-packages/django_redis/cache.py", line 34, in _decorator
    raise e.__cause__
  File "/usr/local/lib/python3.7/site-packages/django_redis/client/default.py", line 156, in set
    return bool(client.set(nkey, nvalue, nx=nx, px=timeout, xx=xx))
  File "/usr/local/lib/python3.7/site-packages/redis/client.py", line 1801, in set
    return self.execute_command('SET', *pieces)
  File "/usr/local/lib/python3.7/site-packages/redis/client.py", line 900, in execute_command
    conn.send_command(*args)
  File "/usr/local/lib/python3.7/site-packages/redis/connection.py", line 726, in send_command
    check_health=kwargs.get('check_health', True))
  File "/usr/local/lib/python3.7/site-packages/redis/connection.py", line 718, in send_packed_command
    (errno, errmsg))
redis.exceptions.ConnectionError: Error 104 while writing to socket. Connection reset by peer.
jonaswinkler commented 3 years ago

I'm aware and have this already fixed.

jonaswinkler commented 3 years ago

1.1.2 addresses this. Please close this issue if that fixes your problems. (Still building, that will take about an hour.)