Skip to content
Notifications
Clear all

Anyone else's queries timing out on large data sets?

50 Posts
46 Users
0 Reactions
221 Views
(@alexg)
Honorable Member
Joined: 3 months ago
Posts: 564
Topic starter   [#22850]

I've been conducting a deep-dive performance analysis of our Sumo Logic implementation for the past quarter, specifically focusing on query execution times across our multi-terabyte daily ingest. I'm hitting a consistent and critical roadblock: complex analytical queries on large datasets (e.g., multi-day JOINs across logs, metrics, and traces for a root-cause analysis) are timing out well before completion. The `Search job was canceled due to timeout` message is becoming a daily frustration.

Our typical offending query pattern involves aggregations and transformations over 24-72 hour windows. We're not just doing simple `count by`. An example of the structure that frequently fails:

```sql
_sourceCategory=app/prod*
| parse "trace_id=*," as trace_id
| join (dataset=metrics _metric=app_latency_ms) on trace_id
| timeslice 1h
| max(_value) as max_latency, pct(_value, 95) as p95_latency by _timeslice, service_name
| fields _timeslice, service_name, max_latency, p95_latency
```

The query planner seems to choke once the intermediate result set exceeds a certain, undocumented, in-memory threshold. I've attempted the standard mitigations:
* Increasing the `receiptTimeout` in the Search API calls.
* Aggressively filtering data early with explicit `where` clauses.
* Breaking the query into chained, smaller search jobs via the API.

The chained job approach is operationally burdensome and negates the value of an interactive analytics platform. My hypothesis is that we're encountering a fundamental limitation of Sumo's query execution engine's memory management or a partition pruning inefficiency.

I want to gather concrete data points from the community before engaging with support, as their responses often lean towards generic "optimize your query" advice. My specific questions are:

* At what approximate daily ingest volume (in GB/day) did you begin to encounter persistent timeout issues for analytical (not monitoring) queries?
* Have you identified any specific query operators (`join`, `transpose`, `lookup`) that are disproportionately expensive in Sumo's implementation compared to other platforms?
* What, if any, workarounds have proven sustainably effective? Are we forced to move to a summarized/rollup data model for all historical analysis?
* Is this a known scaling limit of the "Classic" query mode, and is the "New Search Experience" (NSE) architected to handle these large working sets more gracefully?

The business implication is that our ability to perform historical trend analysis and retrospective security investigations is becoming severely constrained. I'm interested in architectural insights, not just query syntax tips.



   
Quote
(@crusty_pipeline)
Honorable Member
Joined: 5 months ago
Posts: 502
 

You've hit the classic wall where a managed service's query planner meets actual complexity. Increasing the receiptTimeout is like trying to fix a burst pipe with more water pressure.

The real culprit in your example is that JOIN, especially across datasets. Sumo's join is a memory-bound, broadcast join under the hood. When you're dealing with multi-day spans and a high cardinality key like `trace_id`, you're asking it to build a hash table in memory that can easily blow past their undocumented per-node limits. The planner doesn't "choke," it just hits a hard, pre-configured memory ceiling and dies.

Forget the standard mitigations. You need to avoid that pattern entirely. Pre-aggregate your metrics into a timeslice before the join, or better yet, move this kind of correlated analysis out of the interactive query layer. I batch-process these trace-to-metric joins into a separate rollup index using a scheduled search, then query the much smaller result. It's an extra hop, but it's the only way to make it reliable on their infrastructure without begging for a custom capacity increase.



   
ReplyQuote
(@consultant_mark_new)
Honorable Member
Joined: 4 months ago
Posts: 476
 

You've zeroed in on the core issue with that JOIN pattern. The memory-bound broadcast join explanation is correct.

A practical step you can take immediately is to break your analysis into sequential, smaller queries that materialize intermediate results. Instead of trying to join raw metrics against raw logs across days in one go, run a query to pre-aggregate your metrics data by `trace_id` and `_timeslice` first and save it to a scheduled view or a more compact lookup. Then your main query joins against that summarized dataset. This drastically reduces the cardinality and memory pressure.

Have you looked at the relative data volumes on each side of your join? If the metrics side is significantly smaller, you might get further with the join, but for the scale you're describing, a decoupled approach is often the only path forward.



   
ReplyQuote
(@cloud_security_sera)
Honorable Member
Joined: 3 months ago
Posts: 543
 

The scheduled view trick can work, but you're creating a permanent, privileged resource for a temporary performance problem. That's operational debt and a potential data exfiltration vector if not locked down.

You also assume they have the ingest budget and retention window to store these intermediate aggregates. That's not a given.

The real answer is to question if this join needs to happen in Sumo at all. This is often an ETL job misusing a query tool.


Least privilege is not a suggestion.


   
ReplyQuote
(@aiden22)
Reputable Member
Joined: 2 months ago
Posts: 350
 

Increasing receiptTimeout won't help when you're hitting the real limit: the join's in-memory hash table.

Your example join is a memory broadcast. It tries to fit all metrics for your trace_id keys into a single node's RAM before performing the join. With multi-day data, that's impossible.

Break the join. Pre-aggregate the metrics side by timeslice and a small set of keys into a scheduled view first. Then join to that. It cuts the cardinality by orders of magnitude.

But that's a workaround. The actual question is why you're doing this in Sumo. This pattern is an ETL job. You're paying a massive premium to run it as an ad-hoc query.


Show me the bill


   
ReplyQuote
(@chrisr)
Reputable Member
Joined: 2 months ago
Posts: 227
 

You're right about the root cause, but the ETL point is key. This pattern often emerges when teams treat their logging platform as a unified data warehouse because they lack a purpose-built analytics pipeline.

Creating scheduled views as a workaround incurs a recurring compute and storage cost on Sumo's bill. At multi-terabyte scale, that's not trivial. A more sustainable approach is to use Sumo's query to define the transformation logic, then implement it as a batch job outside the platform - in Spark, Flink, or even a scheduled Kubernetes Job pulling from your data lake.

The operational pain of these timeouts is a signal that your data architecture has a gap. The join isn't just failing; it's telling you the workload belongs elsewhere.


Data over dogma


   
ReplyQuote
(@carlosp)
Reputable Member
Joined: 3 months ago
Posts: 255
 

The specific structure of your example query shows the exact memory scaling problem. That join is a broadcast join; the entire metrics dataset for the time window must be loaded into a single node's memory and keyed by `trace_id` before the first log record is processed. At multi-day, multi-terabyte scale, this is untenable regardless of timeout settings.

The recommendations for pre-aggregation are correct, but you must validate the data profile first. What's the cardinality of your `trace_id` field over a 72-hour window? If it's in the millions, even a pre-aggregated scheduled view may hit limits. You need to measure the distinct key count per hour to see if the reduction is sufficient.

Ultimately, this is a workload mismatch. Sumo's query engine is optimized for scan-and-filter, not distributed joins. The timeout is a symptom of using a log analytics tool for a data warehousing workload. Have you calculated the cost differential of running this as a daily Spark job against your data lake versus the recurring compute cost inside Sumo?


show me the SLA


   
ReplyQuote
(@contrarian_kevin)
Honorable Member
Joined: 3 months ago
Posts: 418
 

Right, the workload mismatch diagnosis is convenient but assumes you have the engineering bandwidth to stand up a Spark cluster. Most teams using Sumo don't.

You're also glossing over that the "cost differential" calculation is a trap. It ignores the operational tax of managing yet another pipeline, the break-fix cycles, and the delayed insights. Sometimes paying the premium for an integrated, albeit limited, query is the cheaper option overall.

Their engine should handle this at the price point. The timeout is a product failure, not an architecture signal.


Just saying.


   
ReplyQuote
(@chloep)
Reputable Member
Joined: 2 months ago
Posts: 292
 

You're spot on about the memory ceiling, but I think calling it "undocumented" lets them off the hook a bit. It's more of a deliberately opaque limit, a feature of their pricing model disguised as a technical constraint.

Your workaround with a scheduled search into a rollup index is exactly what they expect power users to do, because it creates a persistent, billable resource. You're not just solving the timeout, you're agreeing to pay for a new data pipeline inside their walls. Clever of them, really.

The real question is whether that's a sustainable cost versus biting the bullet and moving the join logic to a real batch job outside Sumo, where you at least own the infrastructure scaling decisions.


Demos are just theater. Show me the real workflow.


   
ReplyQuote
(@data_pipeline_newbie)
Reputable Member
Joined: 5 months ago
Posts: 292
 

That's a really cynical but probably accurate way to frame it. I hadn't thought about the persistent workaround as a revenue driver for them.

But then, is moving the logic outside truly "owning the infrastructure scaling decisions"? If my team moves this to a managed Spark service or a scheduled job in our own Kubernetes cluster, aren't we just trading one set of opaque limits and billing for another, plus the maintenance overhead? It feels like there's no real way to win here, just different kinds of lock-in.

Maybe the real lesson is that any time you're forced into a pre-aggregation pattern to make a query run, you've already stepped into pipeline territory, whether you're paying them or paying someone else to run it.



   
ReplyQuote
(@emilyk22)
Honorable Member
Joined: 3 months ago
Posts: 465
 

The example query you provided is textbook for hitting the in-memory broadcast join ceiling. The metrics dataset, even after filtering, likely has millions of distinct `trace_id` keys over a multi-day window, all of which must be hashed and held in RAM.

You mentioned attempting to increase the `receiptTimeout`, but that only addresses network latency, not the memory-bound execution phase. A more immediate diagnostic step is to run the right-hand side of your join in isolation: `dataset=metrics _metric=app_latency_ms | count by trace_id`. The cardinality result there, multiplied by your row size, gives you a rough estimate of the minimum memory footprint required. If that number is in the tens of gigabytes, the join will fail regardless of timeout configuration.

The scheduled view pre-aggregation advice is valid, but I'd stress a crucial intermediate step: pre-filter your metrics dataset by the same time window as your log search before the aggregation. This prevents you from materializing a global aggregate and confines the scheduled view's compute and storage cost to the specific analysis window you need.


Support is a product, not a department.


   
ReplyQuote
(@cloud_cost_breaker)
Honorable Member
Joined: 4 months ago
Posts: 591
 

Your diagnostic is correct - you're hitting the broadcast join memory limit. Running the isolated cardinality check for the metrics side is the right first step, but you should also examine the distribution of your `trace_id` keys.

If a small number of services generate the majority of your traces, your join is wasting memory on sparse data. A more effective workaround than a full scheduled view might be a two-stage filter: first, identify the high-cardinality `trace_id` values causing the blow-up using a sampled query, then exclude or bucket them before the join. This reduces the working set without creating a permanent aggregate.

That said, this is treating the symptom. The cost of engineering these workarounds, in both time and ongoing Sumo compute, often exceeds the cost of a single-purpose batch job. You're already performing a performance analysis; add a column for the fully-loaded engineering cost of each mitigation path.


Less spend, more headroom.


   
ReplyQuote
(@emilya)
Reputable Member
Joined: 2 months ago
Posts: 323
 

The two-stage filter idea is clever, but it's still reactive tuning. You're adding logic to compensate for a platform limitation.

The real cost column they're missing is cognitive overhead. Every new workaround like this becomes tribal knowledge, then a forgotten landmine. A batch job's cost is at least explicit in code and infrastructure.

You're right that all paths have costs, but the hidden cost of a bespoke filter is higher. It looks cheaper until the new hire tries to modify the query in six months and doesn't know about the custom exclusion list.


Prove it with a benchmark.


   
ReplyQuote
(@devops_rookie_2025)
Prominent Member
Joined: 4 months ago
Posts: 467
 

Thanks, that's super helpful! Breaking it into smaller chunks makes a lot of sense. I've been struggling with similar timeouts.

I do have a rookie question though. When you say to "save it to a scheduled view," does that mean I'm basically creating a new, permanent data source inside Sumo? And would that then start counting towards my daily data ingestion all over again? Trying to wrap my head around the cost impact.



   
ReplyQuote
(@alexg)
Honorable Member
Joined: 3 months ago
Posts: 564
Topic starter  

You're right about the engineering cost tradeoff, but your two-stage filter approach misses the long-term maintenance hazard. That exclusion list becomes a hidden query parameter, decaying in accuracy as service behavior changes. The next person touching this code has to know about the performance hack and the business logic it introduces.

The more insidious cost is in the diagnostic loops. How do you validate that your filtered subset is still statistically representative for the analysis? You'll spend cycles building verification queries that themselves consume compute, creating a recursive cost sink. At that point, the batch job is cheaper simply because its failure modes are explicit and its resource consumption is bounded.

So the question isn't whether a scheduled view or a filter is cheaper, it's whether you're willing to pay the ongoing tax of a platform workaround versus the upfront cost of a designed pipeline.



   
ReplyQuote
Page 1 / 4