Description:
I have an application written with Python3. The used package list (requirements.txt) & Dockerfile can be found below.
requirements.txt
asyncpg==0.29.0
colorlog==6.8.2
httpx==0.27.2
jsonpickle==3.2.2
marshmallow-jsonapi==0.24.0
nats-py==2.9.0
pydantic==2.9.2
pydantic-settings==2.6.1
python-dotenv==1.0.1
SQLAlchemy==2.0.31
taskiq-faststream==0.2.0
Dockerfile
FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PORT=7000
WORKDIR /tc_core_shoppingbasket_backgroundservice
COPY . /tc_core_shoppingbasket_backgroundservice
RUN pip install --no-cache-dir --upgrade -r requirements.txt
EXPOSE $PORT
CMD ["sh", "-c", "taskiq scheduler main:app & python3 -m http.server -d /healthiness $PORT"]
This is a background service application that contains two types of services:
Expectation: Using the same mentioned Dockerfile the built image is running as expected without any unexpected delays on both: Locally (Docker Desktop) & Cloud (AWS ECS). Want the similar response from GCP > Cloud Run > Service.
ISSUE: Whenever tried to run on GCP > Cloud Run > Service, facing two things:
Hi @ShaonDeyTC,
Are you getting any error messages? Also can you share to us the logs from the Cloud Run? This will help us troubleshoot your issue. For the meantime, you may try the following and see if it fixes the issue:
Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.
Hi, @ronnelg, Thank you for the suggestions.
TLDR: Later, I'll share the logs from GCP. I'll try it running with a different Execution environment.
Details:
0. I'm not getting any error messages that denote this delay or application startup error. I'll try to export the logs from GCP & share it with you.
I'm facing the same issue. were you able to resolve it?
No! I've switched to AWS ECS for this project and getting the results as expected. It's been 5 months on an issue being reported and not been even acknowledged properly from the support team!
@horizon_ are you facing the issue with the same specifications? Python, FastStream, NATS JetStream, GCP Cloud Run?