I have a simple Dockerfile:
FROM mcr.microsoft.com/playwright:v1.35.0-jammy
WORKDIR /app
COPY . /app
RUN npm install
CMD ["node", "index.js"]
which doesn't do so much and installs playwrights base image which contains chromium. And I have an express server which takes a screenshot of a page sent to the server (super simple express server with 1 post request).
My question is when I run the container traditional way `docker run ...` and send an http request to my endpoint it responds super fast which is around 2-3 second (it's fast considering the job 🫣) but when I run my container with gcloud beta code dev it takes 5 minutes to respond. I am not sure why it's super slow.
I would like to test it with increasing cpu/memory allocation to container but not sure if the gcloud beta code dev accepts in any shape of form resource modifications.
Hi @suchcodemuchwow,
Welcome to the Google Cloud Community!
There are a number of reasons why Cloud Run is running slow.
gcloud run services update (name of service) --cpu (number of desired CPU)
gcloud run services update (name of service) --memory (desired size)
Let me know if it helped, thanks!