Like what we’re doing? Star us on GitHub!

Random error after updating Collection

last week

Hello all, just started seeing this issue after updating my page collection. I simply cleaned up my block imports, but now I get this every 2-3 page loads.

Those paths seems very weird. No idea what's happening.

@jesschow This came out of nowhere really, not sure even how to debug it

some files load, some don't because of our load balancer

wondering if that may be causing the issues with chunked names

The weird thing is this started happening randomly

I moved my block imports to separate files in a folder "blocks" within collections

Then I restarted payload and started getting these errors

I reset the changes I made, but the errors persist

Made a bug report here:

Currently unable to edit our collections

@jmikrut Sorry for the ping, this issue is making it so we cant access the Admin panel (or we can but only when the load balancer hits our second machine). Really cant figure out what I might have changed. I tried deleting the .cache directory in node_modules in case it was a webpack thing, but this just started happening almost out of nowhere

  • jmikrut
    Payload Team
    last week

    ah hello

    i don't know why i didn't see this one before

    ok so when your load balancer hits the second machine, it works, but not for the first machine?

    has anything changed with your load balancer config?

  • thisisnotchris
    last week

    I don't think so, I came into work today, made a couple of edits to our "Pages" collection, noticed the issues (not sure if related), reverted the file, issue persisting

    I can see the error doesn't happen on Server 2

    But it's happening on the primary

    Which is odd, because they should have the same config

    I'll check nginx to confirm

    Yeah the nginx configs are identical

    Also nothing has changed AFAIK with the load balancer, I can ask, but I doubt it

    The weird thing is that I'm seeing files generated like '


    I would normally just say "Let me try disabling chunking" in the WP config

    But i swear it was working perfectly the other day

  • jmikrut
    Payload Team
    last week

    do you have the proper files in your


    folder that you need?

    like, those files should all exist in the



    maybe you need to run

    yarn build

    on both your load balanced servers

    and maybe also, you might have some caching in place that is telling your browser to load old files that no longer exist

    do you have a CDN? can you purge caches?

  • thisisnotchris
    last week


    @jmikrut im actually running dev rn on both servers for testing, is that bad?

    And in addition, dont those urls look weird?

  • jmikrut
    Payload Team
    last week

    well, webpack dev mode does all sorts of chunking craziness

    so i wouldn't expect rationality out of the URLs that webpack in dev mode produces

  • thisisnotchris
    last week


    OK that's fair

    But I guess im worried about when i build, wont the filenames not line up if I have two instances of Payload?

    Server 1 has payload + mongo

    Server 2 has payload + mongo (replication set for mongo)

    When i go to build both, the load balancer will have a hard time with the generated assets right?

    I suppose ill try the build now

  • jmikrut
    Payload Team
    last week

    i think the only time that would be a problem is if you have some sort of caching in place that caches the HTML of the admin UI, which would then cache only the filenames of

    one build

    so then when you go to visit the other build, say server B, you'd be getting the cached HTML of server A and they might not line up

  • thisisnotchris
    last week

    @jmikrut We ended up only pushing build/dist to prod, instead of running dev for tests

    Then we didnt have issues with chunked names etc

    and then the file names aligned

  • jmikrut
    Payload Team
    last week


Open the post
Continue the discussion in Discord
Can't find what you're looking for?
Get help straight from the Payload team with an Enterprise License.Learn More