Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

actix_web pipeline error - 502 - Too many open files #44

Open
Januszpl opened this issue Nov 21, 2018 · 8 comments
Open

actix_web pipeline error - 502 - Too many open files #44

Januszpl opened this issue Nov 21, 2018 · 8 comments

Comments

@Januszpl
Copy link
Contributor

Januszpl commented Nov 21, 2018

When experimenting with different bundle-config.yml I was editing config and browsing website. Then suddenly I got empty build.json and I noticed that I had serveral errors like this one:

ERROR 2018-11-21T01:21:50Z: actix_web::pipeline: Error occured during request handling, status: 502 Bad Gateway Failed to connect to host: Too many open files (os error 24)

and then:

thread 'arbiter:2fed453f-22f1-4ccf-b941-935d1a843a2b:actix-net-worker-0' panicked at 'can read current dir: Os { code: 24, kind: Other, message: "Too many open files" }', libcore/result.rs:1009:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
ERROR 2018-11-21T01:21:50Z: actix_net::server::accept: No workers
ERROR 2018-11-21T01:21:50Z: actix_net::server::server: Worker has died 0, restarting

Adding this ticket for further investigating.

My config when error happened (custom project)

bundles:
  - name: "bundles/simple-page"
    urls:
      - "/o-nas"
    children:
      - name: "bundles/cms-page"
        urls:
        - "/kontakt"
        children:
          - name: "bundles/category"
            urls:
              - "/meskie/odziez/spodnie"
              - "/search/result/?q=spodnie"
            children: []
          - name: "bundles/homepage"
            urls:
              - "/"
            children: []
          - name: "bundles/product"
            urls:
              - "/spodnie-1"
            children: []
          - name: "bundles/cart"
            urls:
              - "/checkout/cart"
              - "/checkout/cart/"
            children: []
          - name: "customer-account"
            urls:
              - "customer/account/login/"
              - "/customer/account/index/"
              - "/customer/account/index"
              - "/customer/account/edit"
              - "/customer/account/edit/"
              - "sales/order/view/order_id/121/"
              - "/customer/address/new/"
              - "/sales/order/history/"
              - "/aw_rma/customer/"
              - "/wishlist"
            children: []
          - name: "club"
            urls:
              - "/club"
            children: []
  - name: "bundles/checkout"
    urls:
      - "/checkout"
      - "/checkout/"
      - "/checkout/#payment"
    children: []
@shakyShane
Copy link
Contributor

Could this be a result of the massive timeout from before? I've never personally seen it

@Januszpl
Copy link
Contributor Author

I think it's more related to huge list of config. I guess it's related to generating build.json and visiting too many pages from bundle-config.yml

@shakyShane
Copy link
Contributor

shakyShane commented Nov 27, 2018 via email

@shakyShane
Copy link
Contributor

@Januszpl I've seen this happen now, but only on Linux, is that what you're using?

@Januszpl
Copy link
Contributor Author

Januszpl commented Dec 3, 2018

OS X High Sierra 10.13.6

@rvr31
Copy link

rvr31 commented Jan 23, 2019

+1 for this. Having it on linux.

@Januszpl
Copy link
Contributor Author

@Robin31 any updates?
ps. in my case I used M2-devtools to generate build with some manual fixes and custom tool to trigger requirejs optimizer etc. However would be nice to see if someone else managed to use config-gen in some project on production

@mcretien
Copy link

mcretien commented Apr 2, 2019

Same here on OS X High Sierra 10.13.6.

The OS' file descriptors limit seems to be quite low at 256. As soon as the M2 website you're browsing has more than ~256 requests, config-gen will crash.

I have temporary raised the file descriptor limit using ulimit -n 2048 and issue is gone.
It won't stay after reboot so check on google how to persist that value if you want to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants