#Performance issues

9 messages · Page 1 of 1 (latest)

subtle sky
#

Hi, I'm investigating some performance issues on my production server and I noticed something strange when I load the the /admin/collections/users (with a single user in the database).

  1. the "not-found" server component is beeing rendered even if I'm on an existing route, Maybe it's something from nextjs default behavior
    2: I can see a lot of pg-pool.connect, is payload creating a new database connection for each request ?
honest iron
# subtle sky Hi, I'm investigating some performance issues on my production server and I noti...

What tool is that?

the "not-found" server component is beeing rendered even if I'm on an existing route, Maybe it's something from nextjs default behavior
Yea that's because the notfound page is part of the same dynamic route as the main page. As far as I remember we can't hoist it up, as it could affect the notfound page of your frontend. Related issue: https://github.com/vercel/next.js/issues/59180

GitHub

Link to the code that reproduces this issue https://codesandbox.io/p/devbox/blissful-fog-nflrh6 To Reproduce Open sandbox and click not found page It will redirect to the generic nextjs 404 page Cu...

#

can see a lot of pg-pool.connect, is payload creating a new database connection for each request ?
CC @strange fable @upper token

#

Regarding the notfound issue, I have a PR open that should noticeably speed up rendering of the notfound page, by caching and sharing data already calculated in the layout.tsx: https://github.com/payloadcms/payload/pull/11312

Should hopefully make it into the next release

#

next release should also get rid of and speed up some of those preferences db queries

#

3.25.0-canary.6d6bbd2 you can test out this canary to see if it improves things

subtle sky
upper token