WMS GetCapabilities get too long to return a response

Hi all,
I have a geoserver 2.25.2 installation (docker) and if I make a GetCapabilities request to a specific workspace, it takes 4 minutes to return the response and sometimes the request is aborted (status 200 ns_error_net_partial_transfer). The same request to another workspace works perfectly. I have tried both from browser (Chrome, Fiorefox and Edge) and a client like QGIS.

If it was a proxy or firewall issue, I would have the same error with other workspaces. Could it be due to one or more layers published in the workspace?

Thanks in advance!
Roberta

yes, slow database connections can slow things down as well as missing and/or expensive to calculate metadata eg. bounds, crs,…

Thanks for your feedback. Is there a geoserver tool that analyzes layers to identify any problems?

You could try the generic https://geohealthcheck.org which is cute; it tracks availability (and you could set it up to monitor individual layers). Keep in mind this is an external monitoring system and does not help identify performance or configuration improvements.