# Sidekiq jobs are failing for 1 of my users

**URL:** <https://meta.discourse.org/t/sidekiq-jobs-are-failing-for-1-of-my-users/51143>\
**Category:** Self-hosting\
**Created:** [5 oktober 2016 om 20:56 UTC](https://meta.discourse.org/t/sidekiq-jobs-are-failing-for-1-of-my-users/51143 "2016-10-05T20:56:49Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![corillian](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/corillian/32/1847_2.png) [@corillian](https://meta.discourse.org/u/corillian)\
**Post date:** [5 oktober 2016 om 20:56 UTC](https://meta.discourse.org/t/sidekiq-jobs-are-failing-for-1-of-my-users/51143/1 "2016-10-05T20:56:49Z")

</div>

For some reason one of my users appears to be bugged. He cannot view the forums due to a 500 Internal Error and all of the pending Sidekiq jobs for him also fail. Here’s an example of one of the failing Sidekiq jobs:

```plaintext
Jobs::UserEmail

{"type"=>"digest", "user_id"=>3530, "current_site_id"=>"default"}

Jobs::HandledExceptionWrapper: Wrapped NoMethodError: undefined method 'bounce_score' for nil:NilClass

```

In all instances the logs indicate the problem with his account is due to `undefined method 'bounce_score' for nil:NilClass` except with a different undefined method depending on which database object was trying to be accessed. For example his 500 Internal Error viewing the main page is generated by:

```plaintext
Processing by ListController#latest as HTML
Completed 500 Internal Server Error in 30ms (ActiveRecord: 13.1ms)
NoMethodError (undefined method 'topic_reply_count' for nil:NilClass)
/var/www/discourse/app/serializers/current_user_serializer.rb:51:in 'reply_count'
Job exception: undefined method 'days_visited' for nil:NilClass

```

I’ve checked the records in the database and they exist. Is the Redis cache somehow corrupted? I’m running the latest version of Discourse (I just upgraded to latest commit) and it didn’t resolve these problems.

Lastly I can’t do a search for users through my admin panel anymore due to a similar error:

```plaintext
Started GET "/admin/users/list/regular.json?_=1474829263900" for **** at 2016-09-25 19:03:37 +0000
Processing by Admin::UsersController#index as JSON
  Parameters: {"_"=>"1474829263900", "query"=>"regular"}
Completed 500 Internal Server Error in 22ms (ActiveRecord: 6.0ms)
NoMethodError (undefined method `time_read' for nil:NilClass)
/var/www/discourse/app/serializers/admin_user_list_serializer.rb:72:in `time_read'

```

---

_[View the full topic](https://meta.discourse.org/t/sidekiq-jobs-are-failing-for-1-of-my-users/51143)._
