Successful deploy VM keeps restarting

Successfully deployed web server using express. Monitoring notes indicate continuous restarts. I checked the instance status and found Exit Code 1. I haven’t seen any other errors and the web server seems to be functional.
Only other error from logs is "Health check on port 8080 failed... Services exposed on ports [80, 443] will have intermittent failures until the health check passes."
It then restarts and says that health check passes so it seems to be stuck in a loop.

image

Hi there! From your description, it sounds like your web server itself may be crashing (hence the termination events with a non-zero exit code), and that Fly is subsequently restarting the VM. In the screenshot, it looks like it was up for about a minute; if it is indeed crashing and restart only every minute or so, that would explain why it generally seems to be functional.

It’s hard to tell what’s going on without more information, though. How did you deploy this (e.g. fly launch)? Are you able/willing to post more detailed logs, so we can see the order of events more clearly?

image
Seems like I’m getting a connection timeout every minute or so related to postgres.

Interesting. Connection terminated unexpectedly has me thinking that your app’s PG connections are being closed unexpectedly by the other side, and your app’s PG client doesn’t handle this gracefully.

Are you using Fly PG?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.