In my GCP logs:
<code>INFO: Shutting down
INFO: Waiting for application shutdown.
INFO: Application shutdown complete.
INFO: Finished server process [1]
</code>
<code>INFO: Shutting down
INFO: Waiting for application shutdown.
INFO: Application shutdown complete.
INFO: Finished server process [1]
</code>
INFO: Shutting down
INFO: Waiting for application shutdown.
INFO: Application shutdown complete.
INFO: Finished server process [1]
Which is fine, serverless computing, that’s expected.
Except when I make fresh requests, they get 504
‘d (perhaps 503
?) whichever one means timeout; I’d expect a new instance to spin up and respond?
Weird thing is: it worked fine for months; not sure what I could’ve changed that would make this happen.
No errors in the logs, no warnings, nothing. Just a shutdown and then no startup.
<code># Dockerfile
FROM python:3.12
WORKDIR /backend/
COPY requirements.txt /backend/requirements.txt
RUN pip install
--no-cache-dir
--upgrade
-r requirements.txt
COPY resources/ /backend/resources/
COPY source/ /backend/source/
WORKDIR /backend/source/
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
</code>
<code># Dockerfile
FROM python:3.12
WORKDIR /backend/
COPY requirements.txt /backend/requirements.txt
RUN pip install
--no-cache-dir
--upgrade
-r requirements.txt
COPY resources/ /backend/resources/
COPY source/ /backend/source/
WORKDIR /backend/source/
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
</code>
# Dockerfile
FROM python:3.12
WORKDIR /backend/
COPY requirements.txt /backend/requirements.txt
RUN pip install
--no-cache-dir
--upgrade
-r requirements.txt
COPY resources/ /backend/resources/
COPY source/ /backend/source/
WORKDIR /backend/source/
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
<code># main.py
import fastapi
import endpoints
app = fastapi.FastAPI()
for router in endpoints.routers:
app.include_router(router)
</code>
<code># main.py
import fastapi
import endpoints
app = fastapi.FastAPI()
for router in endpoints.routers:
app.include_router(router)
</code>
# main.py
import fastapi
import endpoints
app = fastapi.FastAPI()
for router in endpoints.routers:
app.include_router(router)