dwyl / hits

:chart_with_upwards_trend: General purpose hits (page views) counter
http://hits.dwyl.com
GNU General Public License v2.0
432 stars 63 forks source link

Internal Server Error #157

Open nelsonic opened 2 years ago

nelsonic commented 2 years ago

https://hits.dwyl.com/test/test.svg image

Lame. 🙄

nelsonic commented 2 years ago

The homepage still renders: https://hits.dwyl.com/ image

But the badges don't. 🤷‍♂️

nelsonic commented 2 years ago

Deploy fails: https://github.com/dwyl/hits/runs/6021229352?check_suite_focus=true 🤦‍♂️
Need to come back to this later. ⏳

SimonLab commented 2 years ago

The deploy failed because of Postgres being unavailable:

Error: :54.363 [error] Postgrex.Protocol (#PID<0.136.0>) failed to connect: ** (DBConnection.ConnectionError) tcp recv: closed

I had a similar error yesterday on another application using Postgres with Fly.io. I've restarted the application database with fly. It took a bit of time to be fixed but it might be worth to try.

flyctl restart hits-db

We can also check the status of the database with flyctl status -a hits-db

see https://fly.io/docs/flyctl/restart/

SimonLab commented 2 years ago

I think the error is still there (or appears again) @nelsonic do you know if the hits application is running under the dwyl organisation on Fly.io? If so, if you invite me to the application I can have a look at the logs and try to see what is the issue.

nelsonic commented 2 years ago

The hits app is currently a personal ... let's fix that! https://fly.io/docs/flyctl/apps-move/ Org: https://fly.io/organizations/hits

flyctl apps move hits-db --org hits
flyctl apps move hits --org hits

Get the following warning:

Moving an app between organizations requires a complete shutdown and restart. This will result in some app downtime.
If the app relies on other services within the current organization, it may not come back up in a healthy manner.
Please confirm whether you wish to restart this app now.
? Move app hits-db? (y/N)

I invited you to the hits org so you should have admin access.

The transfer restarted both the app and the db and hit badges appear to be working again:

HitCount

bartandrews commented 7 months ago

I am also experiencing this problem, suddenly happened as of yesterday/today. It was working fine for 3 months, not sure why I suddenly get "internal server error" here https://hits.dwyl.com/HofstadterTools/HofstadterToolsgithubio Any help would be much appreciated!

nelsonic commented 7 months ago

Lame ... 😢 ⏳

LuchoTurtle commented 6 months ago

@bartandrews it should be working at the time of writing (see #266 for more context). If anything happens again, ping us :D