Losing connection to Gateway caused by running a report

I have 4 types of reports created that I am viewing within one view. You can only view/run 1 at a time, but for some reason the last one I created which is one of the smaller reports I have is causing a timeout and lost connection to the gateway when running it for certain machines in my plant. This report has 8 versions for different machine types and I am only calling one of them at a time by setting the report path and parameters. Can someone help me understand what is happening here?
Some of the reports I can run 3 months of data and some I can't get 1. I even have a limited sample size for each script only pulling data points every half hour instead of 2000 or so.
08:36:37.869 [SwingWorker-pool-1-thread-2] WARN com.inductiveautomation.ignition.client.gateway_interface.GatewayConnectionManager - Connection to Gateway lost, due to exception.
com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Read timed out

Vision (and designer) has a hard 60-second limit for RPC calls, including database and report execution requests. There's no workaround. You have to fix your execution times for such things.

When database queries take unusually long for even small amounts of data, and they used to work fine, it often means the DB tables do not have proper indices set up, and as the total volume of data increases, query duration explodes.

I'd start there. Look in your database stats for slow queries. If they are historian queries, double check that you have indices on time stamps and tag IDs, at a minimum.

What I failed to mention was that I can do the 3 month scans without issue in designer, but once I get it in the vision window it times out. I will try to check in the database to see if there are any slow queries. It just doesn't make sense to me how I am pulling less data and somehow timing out.

What I have found while doing some testing is that i can pull 3 months of data on the ones timing out, but I have to move off of our current historical partition to do it for some lines. I am not sure why.

Really sounds like a DB table issue. Use your DB's management tools to look at the indices on the various partition tables.

You were 100% correct. Something with the way we are partitioning is causing the issue. As long as I am outside of the current week I can pull the data. I found on the other reports that it does the same thing, we didn't see it before because it was rare to pull current times. Thanks for the help. I simply set my report end date timeframe to where it cannot be within 20 days of the current date and everything is running smoothly.