Faq My stats report hangs and doesn't complete, why?
My stats report hangs and doesn't complete, why?

If you are trying to generate the stats report for a selected time frame without success, the reason could be probably related to scalability.

Starting a report generation the browser could hangs for several minutes without generate the final report, or even results in a server error, server crash, a blank page or a 504 timeout.

In this cases probably data to elaborate in the selected time frame requires too much time and resources. You can try to generate single sub-types of reports instead of the full stats report or reduce the time frame interval to ease the process.

This is strictly related to number of visits of the site by day, and so the number of stats collected every day. On high traffic sites, the database will grow quickly and processing data for 1 week could mean analyze thousands of records to calculate final stats report. In all these cases you have to reduce the amount of data processed or increase server resources.

If you can't increase the server timeout for PHP scripts, you can reduce the default timeframe used by JRealtime Analytics to process collected data using the configuration parameter visible in the image below choosing 'By day'. Ensure to logout/login from the Joomla backend once changed this setting to apply it.

default stats

This issue may happen only when you try to generate PDF reports, elaborate and translate to PDF format a huge amount of data is even more resources and CPU expensive. The result could be a blank page that hides a server error under the hood, most probably due to memory limit exceeded or script timeout. You can enable debug mode of JRealtime Analytics and Joomla to display error details on screen during report generation.
Using a different format for reports such as Excel or CSV probably will solve the problem and it's highly recommended for all cases in which huge amounts of data must be processed.

Often elaborating a huge amount of data requires right server settings and resources. Ensure that you are using the component in the right way in relation to the resources of your server and hosting. You can't go to the moon with a hang glider. Equally you can't process thousands of database records with 30 seconds timeout and 64M memory limit for PHP scripts. In these cases the server often show a page with error 500.