Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got 502 from server #36

Closed
Godsmith opened this issue Jun 29, 2023 · 0 comments
Closed

Got 502 from server #36

Godsmith opened this issue Jun 29, 2023 · 0 comments

Comments

@Godsmith
Copy link
Owner

Using the web CLI, I could run a few commands. The dinrplan-db was listed as suspended, and the machine had not started:

/app/bin $ fly apps list
NAME                                    OWNER           STATUS          PLATFORM        LATEST DEPLOY 
dinrplan                                personal        deployed        machines        8m28s ago    
dinrplan-db                             personal        suspended       machines                     
fly-builder-billowing-cloud-7534        personal        deployed        machines  

/app/bin $ fly checks list -a dinrplan-db
Health Checks for dinrplan-db
  NAME | STATUS  | MACHINE        | LAST UPDATED         | OUTPUT                      
-------*---------*----------------*----------------------*-----------------------------
  pg   | warning | 5683074f00d08e | 2023-06-26T20:33:15Z | the machine hasn't started  
-------*---------*----------------*----------------------*-----------------------------
  role | warning | 5683074f00d08e | 2023-06-26T20:33:15Z | the machine hasn't started  
-------*---------*----------------*----------------------*-----------------------------
  vm   | warning | 5683074f00d08e | 2023-06-26T20:33:15Z | the machine hasn't started  
-------*---------*----------------*----------------------*-----------------------------

However, I could not restart it:

/app/bin $ fly pg restart -a dinrplan-db
Error: no active leader found

But I could restart the machine dinrplan-db was running on, and that fixed it:

/app/bin $ fly machine list -a dinrplan-db
1 machines have been retrieved from app dinrplan-db.
View them in the UI here (​https://fly.io/apps/dinrplan-db/machines/)

dinrplan-db
ID              NAME                    STATE   REGION  IMAGE                           IP ADDRESS                              VOLUME                 CREATED                 LAST UPDATED            APP PLATFORM    PROCESS GROUP   SIZE                
5683074f00d08e  winter-forest-5654      stopped ams     flyio/postgres:14.6 (v0.0.34)   fdaa:0:a08f:a7b:23c5:dd86:e028:2        vol_5podq4qzxed4g8w1   2023-03-09T18:25:11Z    2023-06-26T20:33:15Z                    app             shared-cpu-1x:256MB

/app/bin $ fly machine restart 5683074f00d08e -a dinrplan-db
Restarting machine 5683074f00d08e
  Waiting for 5683074f00d08e to become healthy (started, 3/3)
Machine 5683074f00d08e restarted successfully!
/app/bin $ fly pg list
NAME            OWNER           STATUS          LATEST DEPLOY 
dinrplan-db     personal        deployed                     

/app/bin $ fly checks list -a dinrplan-db
Health Checks for dinrplan-db
  NAME | STATUS  | MACHINE        | LAST UPDATED | OUTPUT                                                                   
-------*---------*----------------*--------------*--------------------------------------------------------------------------
  pg   | passing | 5683074f00d08e | 25s ago      | [✓] transactions: read/write (192.07µs)                                  
       |         |                |              | [✓] connections: 11 used, 3 reserved, 300 max (3.89ms)                   
-------*---------*----------------*--------------*--------------------------------------------------------------------------
  role | passing | 5683074f00d08e | 26s ago      | leader                                                                   
-------*---------*----------------*--------------*--------------------------------------------------------------------------
  vm   | passing | 5683074f00d08e | 49s ago      | [✓] checkDisk: 805.58 MB (82.5%) free space on /data/ (32.12µs)          
       |         |                |              | [✓] checkLoad: load averages: 0.00 0.00 0.00 (57.18µs)                   
       |         |                |              | [✓] memory: system spent 0s of the last 60s waiting on memory (34.64µs)  
       |         |                |              | [✓] cpu: system spent 168ms of the last 60s waiting on cpu (15.91µs)     
       |         |                |              | [✓] io: system spent 246ms of the last 60s waiting on io (14.65µs)       
-------*---------*----------------*--------------*--------------------------------------------------------------------------
/app/bin $ 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant