Comments (4)
There seems to be two issues here:
- Queries larger than a certain size are blocked. This is clearly related to the linked bug and should be easy to fix if we are okay increasing the value. We can discus this within the team.
- Loki crashes. This does not happen in the upstream issue. What resources are available to the Loki pod on your system? It might not be enough to handle such large queries. Do you have the cpu or memory config values set? How much memory does your k8s system have?
from loki-k8s-operator.
@dstathis We are using 1 Gi for memory and cpu config is unset.
In terms of memory:
$ kubectl top pod loki-0
NAME CPU(cores) MEMORY(bytes)
loki-0 19m 711Mi
root@loki-0:/# cat /sys/fs/cgroup/memory.max
1073741824
the container requests
resources:
limits:
memory: "1073741824"
requests:
cpu: 250m
memory: 200Mi
The particular k8s node has 32 GiB of total memory.
from loki-k8s-operator.
- Are you able to manually temporarily update the loki config with a higher
grpc_server_max_send_msg_size
? You canjuju ssh
,apt install vim
, edit/etc/loki/loki-local-config.yaml
andpebble restart loki
. If this works then we could easily add it as a config option. - Perhaps you could narrow down your LogQL queries so they return less data?
from loki-k8s-operator.
Thanks for your answers. I will close the ticket as the cause of the crash seems to be clearly memory related (137 exit code) and not due to the ResourceExhausted (I saw this also for other queries without the ResourceExhausted), so this probably indicates that we need to increase the memory (1 Gi seems to be too low, just tested with 2 Gi and at first glance it looks better). I wonder if the charm could log a memory-related warning in this case (if loki exits with 137) to avoid the operator having to look into the k8s logs for troubleshooting.
If necessary I will open another issue related to the grpc_server_max_send_msg_size
config, I could not reproduce it so far this morning.
And of course narrowing the LogQL queries helps, but sometimes it is hard to narrow when you need to find the root cause of an issue first (so you need to know what to narrow for).
from loki-k8s-operator.
Related Issues (20)
- Loki integration with alertmanager requires additional config HOT 1
- Switch to TSDB instead of boltdb-shipper
- Investigate Exposing Loki Compactor Configurations as Charm Configs
- Logs are replayed on pebble replan
- Alert rules and Dashboard panles about log growth rate in Grafana HOT 1
- chore: update libraries to new major versions
- Loki datasource is not reachable from Grafana when using a domain name in Traefik HOT 1
- Add TLS to node-exporter container
- Pebble ConnectionError on logging relation joined HOT 2
- Loki alerts are not being pushed to AlertManager
- charm tracing fails over tls
- add public method to `LogForwarder` to retrieve the full endpoint urls
- LogForwader doesn't handle alert rules
- Incorrectly assuming that `job` label is always there when replacing `%%juju_topology%%` HOT 4
- The LogForwarder should but charm to block state when Juju < 3.4
- TLS not working HOT 2
- Loki unit fails with "logging-relation-departed" after integrating with grafana-agent HOT 1
- Loki's own logs are stored with the "unit" labels instead of "juju_unit"
- Write a Loki data migration HOW-TO
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loki-k8s-operator.