Redis Caching Error: decode failed: gob: wrong type #907

Closed
opened 2021-07-02 23:24:26 +00:00 by MrOwen · 8 comments

Set up Vikunja for the first time yesterday and absolutely loving it! Pretty much smooth sailing except for some errors I noticed in my logs. They are all the same exact error message but I haven't figured out really what triggers them or if they affect any functionality (to my knowledge, everything's still working fine!):

2021-07-02T22:33:27.260819331Z: ERROR ▶ [DATABASE] 0b1 [redis_cacher] decode failed: gob: wrong type (models.RelatedTaskMap) for received field .RelatedTasks

I am running in Kubernetes with vikunja/api:latest (container digest 00aec85296c2) and latest frontend. Here's my related config sections I have for the various redis things:

cache:
  enabled: true
  type: keyvalue (using redis here produces same error)
  #maxelementsize: 1000

redis:
  enabled: true
  host: 'redis-svc.vikunja.svc.cluster.local:6379'
  #password: ''
  db: 0

keyvalue:
  type: "redis"

I searched through previous issues and the forum and no one else seems to have run into this but I'm not sure what I could possibly have misconfigured.

Feel like I have a pretty "vanilla" setup but please let me know if you need any additional info and you definitely got a few coffees from me for this project ❤️

Set up Vikunja for the first time yesterday and absolutely loving it! Pretty much smooth sailing except for some errors I noticed in my logs. They are all the same exact error message but I haven't figured out really what triggers them or if they affect any functionality (to my knowledge, everything's still working fine!): `2021-07-02T22:33:27.260819331Z: ERROR ▶ [DATABASE] 0b1 [redis_cacher] decode failed: gob: wrong type (models.RelatedTaskMap) for received field .RelatedTasks` I am running in Kubernetes with `vikunja/api:latest` (container digest `00aec85296c2`) and latest frontend. Here's my related config sections I have for the various redis things: ```yaml cache: enabled: true type: keyvalue (using redis here produces same error) #maxelementsize: 1000 redis: enabled: true host: 'redis-svc.vikunja.svc.cluster.local:6379' #password: '' db: 0 keyvalue: type: "redis" ``` I searched through previous issues and the forum and no one else seems to have run into this but I'm not sure what I could possibly have misconfigured. Feel like I have a pretty "vanilla" setup but please let me know if you need any additional info and you definitely got a few coffees from me for this project ❤️
Owner

That's a known error in the redis caching layer of the orm (upstream). If that does not work it will fall back to bypass caching which is why you don't really notice the difference. There's not much we can do about it other than waiting until they release a fix.

If you don't run Vikunja in a HA setup with a lot of users you won't need explicit caching with redis. In my experience the network overhead makes it usually even slower than without caching.

type: keyvalue (using redis here produces same error)

That's because you've configured redis as the storage type for keyvalue. Using keyvalue here means it will use whatever you configured in hte keyvalue setting.

That's a known error in the redis caching layer of the orm (upstream). If that does not work it will fall back to bypass caching which is why you don't really notice the difference. There's not much we can do about it other than waiting until they release a fix. If you don't run Vikunja in a HA setup with a lot of users you won't need explicit caching with redis. In my experience the network overhead makes it usually even slower than without caching. > type: keyvalue (using redis here produces same error) That's because you've configured `redis` as the storage type for keyvalue. Using `keyvalue` here means it will use whatever you configured in hte keyvalue setting.
konrad added the
kind/bug
label 2021-07-05 08:58:06 +00:00
Author

Gotcha, thanks for the info! I figured with one person it wouldn't make a difference for performance but just in my nature to tinker with these things 😅

Gotcha, thanks for the info! I figured with one person it wouldn't make a difference for performance but just in my nature to tinker with these things 😅
Contributor

Hi, thanks again for this project! I'm experiencing the same error here still. Is this issue still not fixed upstream? Do you have a link to the upstream issue?

Hi, thanks again for this project! I'm experiencing the same error here still. Is this issue still not fixed upstream? Do you have a link to the upstream issue?
Owner

@dead10ck No, still not fixed. I'm not sure if the error is either in xorm or the gob library which encodes the data.

@dead10ck No, still not fixed. I'm not sure if the error is either in xorm or the gob library which encodes the data.
Contributor

In this case, I wonder if redis should just be removed from the docs? It's completely nonfunctional and appears to have been for 2 years now.

In this case, I wonder if redis should just be removed from the docs? It's completely nonfunctional and appears to have been for 2 years now.
Member

@konrad Maybe reopen this issue, so that it's easier accessible.

In this case, I wonder if redis should just be removed from the docs? It's completely nonfunctional and appears to have been for 2 years now.

Maybe at least add a link to this thread.

@konrad Maybe reopen this issue, so that it's easier accessible. > In this case, I wonder if redis should just be removed from the docs? It's completely nonfunctional and appears to have been for 2 years now. Maybe at least add a link to this thread.
Owner

My plan is to even remove the database caching altogether.

My plan is to even remove the database caching altogether.
konrad reopened this issue 2023-04-03 05:23:09 +00:00
konrad referenced this issue from a commit 2023-06-08 15:05:40 +00:00
Owner

Caching options are now removed in d83e3a0a03

Caching options are now removed in https://kolaente.dev/vikunja/api/commit/d83e3a0a037b9a4d40ce22c8c51932eb23963ac2
Sign in to join this conversation.
No Milestone
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/vikunja#907
No description provided.