# 500 internal server error at first page call in the morning

**URL:** https://meta.discourse.org/t/500-internal-server-error-at-first-page-call-in-the-morning/58533
**Category:** Bug
**Created:** [March 7, 2017, 9:45am UTC](https://meta.discourse.org/t/500-internal-server-error-at-first-page-call-in-the-morning/58533 "2017-03-07T09:45:26Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [March 7, 2017, 9:45am UTC](https://meta.discourse.org/t/500-internal-server-error-at-first-page-call-in-the-morning/58533/1 "2017-03-07T09:45:26Z")

</div>

Earlier this morning I accessed the admin panel of my forum via my smartphone, I incorporated discobot to change its name and then logged out. This may or may not be related to the following errors which I saw when I woke up my office PC from hibernation and did the following:

- navigated to the browser tab with a (private) forum discussion that was still open from last night,
- clicked on the Admin item in the hamburger menu,
- received the standard discourse “Ooops, this message is private or deleted” (or so)
- reloaded the browser page

After that, I first received a simple plain-text 500 internal server error. Reloading the page again didn’t help so I think the next I tried was /admin which didn’t lead anywhere (not sure what exactly the server response was). Last, I tried /login which gave me this basic login screen (plus an oversized logo of my site due to lack of CSS):

 ![](https://global.discourse-cdn.com/meta/original/3X/e/1/e1570b8a230ddce05e7dde1c17e5dcbfb0ea37b7.png)  
I was then able to login using that login-button and the page rendered fine.

In the error logs I find three instances of the following error (can send backtrace details for each of them if required):

```
ActionView::Template::Error (Discourse::InvalidAccess)
/var/www/discourse/lib/auth/default_current_user_provider.rb:67:in `rescue in current_user'

```

I am on discourse version b2cfad5 (or v1.8.0.beta5 +202 according to the dashboard).

---

<div class="post-metadata">

### Author: ![DoMiN8ToR](https://avatars.discourse-cdn.com/v4/letter/d/b2d939/32.png) [@DoMiN8ToR](https://meta.discourse.org/u/DoMiN8ToR)
#### Post date: [March 7, 2017, 2:29pm UTC](https://meta.discourse.org/t/500-internal-server-error-at-first-page-call-in-the-morning/58533/2 "2017-03-07T14:29:30Z")

</div>

I am getting error 500s (hosted discourse) on and off too today.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 7, 2017, 2:32pm UTC](https://meta.discourse.org/t/500-internal-server-error-at-first-page-call-in-the-morning/58533/3 "2017-03-07T14:32:12Z")

</div>

This is actually this issue:

> [@Reports of user logged out twice today - related to recent auth tokens changes?](https://meta.discourse.org/t/reports-of-user-logged-out-twice-today-related-to-recent-auth-tokens-changes/57330):
>
> On the [SE23 Forum](https://se23.life) I’ve had a few bug reports today which concerned me. The most notable error is a user being logged out twice when returning to the site on her iPad. “I came back to the site after some time and it auto-refreshed on my iPad. So I would see things as if I was logged in and then when it auto-refreshed, I was logged out. Hasn’t happened every time today, but happened twice” I upgraded Discourse to the latest core code late last night, and also added the [Data Explorer](https://meta.discourse.org/t/32566?silent=true) and Topic Li…

A side effect of one of my fixes, I reopened the original, lets keeps all discussion there.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [March 7, 2017, 2:32pm UTC](https://meta.discourse.org/t/500-internal-server-error-at-first-page-call-in-the-morning/58533/4 "2017-03-07T14:32:16Z")

</div>


