Predictive analytics extension times out on large datasets during API calls for sales forecasting

Our predictive analytics extension consistently times out when processing datasets over 50K rows via the Advanced Analytics API. The extension calls an R script for time series forecasting, and smaller datasets (under 10K rows) work fine. Error message:


Error: Request timeout after 30000ms
at AdvancedAnalyticsAPI.executeScript

I’m wondering if there’s a way to configure API timeout settings specifically for extension scripts, or if we need to optimize how we’re handling large datasets in the R script itself. The forecasting calculations are blocking our monthly planning dashboards. Anyone experienced with extension script optimization for large data volumes?

Another optimization technique - if you’re forecasting multiple time series (like different products or regions), parallelize the R script using the parallel package. This way you’re not processing series sequentially. Just be mindful of the number of cores available on your Qlik server.

The 30-second timeout is a default API setting that can be adjusted, but I’d first look at your R script efficiency. Are you processing all 50K rows at once, or can you implement batching? Time series forecasting on large datasets can be memory-intensive. Consider using data.table instead of base R data frames for faster operations, and vectorize your calculations where possible.