pwa-studio icon indicating copy to clipboard operation
pwa-studio copied to clipboard

[bug]: When venia is hosted on docker, network requests run queued

Open skisielewicz9bits opened this issue 2 years ago • 9 comments

Describe the bug

We are facing performance issues in our project based on venia concept, main issue for now are as in the topic queued requests ran from storefront. When we launch the upward server on main OS(Ubuntu 21.10) everything seems fine as in the screenshoot below: image The problem starts when app is dockerized: image Venia demo is facing same issue as I described: image

To reproduce

Steps to reproduce the behavior:

Run any implementation based on pwa studio dockerized, check devtools network requests waterfall for xhr/fetch requests.

Expected behavior

Parallel on dockerized app as it works without docker.

Please let us know what packages this bug is in regards to:

  • [ ] venia-concept
  • [ ] venia-ui
  • [x] pwa-buildpack
  • [ ] peregrine
  • [ ] pwa-devdocs
  • [x] upward-js
  • [ ] upward-spec
  • [ ] create-pwa

skisielewicz9bits avatar Apr 19 '22 13:04 skisielewicz9bits

Hi @skisielewicz9bits. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information.

Add a comment to assign the issue: @magento I am working on this


m2-assistant[bot] avatar Apr 19 '22 13:04 m2-assistant[bot]

@magento export issue to JIRA project PWA as Bug

anthoula avatar Apr 25 '22 14:04 anthoula

:white_check_mark: Jira issue https://jira.corp.magento.com/browse/PWA-2777 is successfully created for this GitHub issue.

github-jira-sync-bot avatar Apr 25 '22 14:04 github-jira-sync-bot

@skisielewicz9bits Would you mind sharing your docker-run command(s)?

OneCricketeer avatar Apr 27 '22 16:04 OneCricketeer

@OneCricketeer hey, we are facing this issue on every setup(staging or local), here is my dockerfile for local development:

FROM node:16.6.0-alpine as build
WORKDIR /usr/src/app

RUN apk --no-cache --virtual add \
    python3 \
    make \
    g++ \
    yarn

COPY package.json yarn.lock ./

RUN yarn install --frozen-lockfile

COPY src ./src
COPY templates ./templates
COPY CENSORED-static ./CENSORED-static
COPY i18n ./i18n
COPY local-intercept.js babel.config.js server.js template.html template-dev.html upward.yml webpack.config.js .graphqlconfig magento-compatibility.js ./

ARG MAGENTO_BACKEND_URL
ARG CHECKOUT_BRAINTREE_TOKEN
ARG ENTRY_TEMPLATE_PATH
ARG GTM_CODE

CMD [ "yarn", "run", "watch"]

skisielewicz9bits avatar Apr 28 '22 07:04 skisielewicz9bits

Thanks, but are you using any specific cpu arguments with docker run or in a docker compose file when running the container, for example?

OneCricketeer avatar Apr 28 '22 15:04 OneCricketeer

No, commad that is launching container is based on that https://github.com/magento/pwa-studio/blob/develop/docker/run-docker

skisielewicz9bits avatar May 02 '22 06:05 skisielewicz9bits

Thanks

I see that's using the included docker-compose. Just wanted to verify you're not modifying anything with that

OneCricketeer avatar May 02 '22 13:05 OneCricketeer

@OneCricketeer no, we just added few env vars

skisielewicz9bits avatar May 02 '22 13:05 skisielewicz9bits

@skisielewicz9bits any update or your workaround on this?

tuyennn avatar Nov 24 '22 06:11 tuyennn

@skisielewicz9bits We are not able to reproduce this issue by following the steps given above. Please help us know if any step is missing.

glo82145 avatar Jul 12 '23 06:07 glo82145

As we have not received any update on the same, hence we are closing it. Please feel free to reopen in case of update.

glo82145 avatar Jul 26 '23 06:07 glo82145