Showing a PDF Document Takes a Lot of Time

Nextcloud version : 26.0.3
Operating system and version : Linux 5.10.0-22-amd64 x86_64
Apache or nginx version : PostgreSQL 13.11 (Debian 13.11-0+deb11u1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
PHP version : 8.0.29

The issue you are facing:

When I in the browser Firefox 114.0.2 click on a PDF file a spinning wheel appears and than it takes up to more than a minute until the browser will show the document.

Is this the first time you’ve seen this error? (Y/N): No. I think this delay has first appeared appr. three weeks ago.

Steps to replicate it: Simple click on any PDF document. The size of the documents seems to be not relevant.

you can try a few different approaches to inspect and debug the issue. Here are some suggestions:

  1. Network Tab: Open the developer tools (F12) and go to the Network tab. Reload the page with the PDF file and observe the network activity. Look for the PDF file in the list of network requests. Check the response time, status, and size of the file. If there are any errors or delays, they might indicate the cause of the slow loading.
  2. Console Tab: Switch to the Console tab in the developer tools and check for any error messages or warnings related to the PDF loading process. JavaScript errors or other messages may provide insights into the issue.
  3. Performance Tab: The Performance tab in the developer tools can help you analyze the performance of your page and identify any bottlenecks or long-running tasks. Start recording the performance and then reload the page with the PDF file. After the loading process completes, stop the recording and analyze the performance profile to see if any particular operations or functions are causing delays.

Additionally, you can try the following general troubleshooting steps:

  • Clear the browser cache: Cached files can sometimes cause loading issues. Clear the cache and try loading the PDF file again.
  • Disable browser extensions: Some browser extensions might interfere with the loading process. Temporarily disable any extensions that could potentially affect the PDF loading.
  • Test in a different browser: Try loading the PDF file in a different browser to see if the issue persists. This can help determine if the problem is specific to your browser or a more general issue.

By using a combination of these techniques, you can gain insights into the slow loading of the PDF file and hopefully identify the cause of the problem.

1 Like