Can't fetch the logs from loki s3 bucket storage older than 2 hrs

I am using digitalocean s3 buckets as storage option for logs. I have configured everything same as given on grafana-loki documentation for storing logs to s3 buckets. The files are getting uploaded to s3 buckets also but when I tried to retrive and visualise the logs on grafana dashboard I am only able to see last 2 hrs of logs and not more than that. I am sharing my loki config below

auth_enabled: false

server:
http_listen_port: 3100
grpc_listen_port: 9096
log_level: debug
grpc_server_max_concurrent_streams: 1000

common:
instance_addr: 127.0.0.1
path_prefix: /home/loki
replication_factor: 1
ring:
kvstore:
store: inmemory

query_range:
results_cache:
cache:
embedded_cache:
enabled: true
max_size_mb: 100

limits_config:
metric_aggregation_enabled: true

schema_config:
configs:

  • from: 2025-08-12
    store: tsdb
    object_store: s3
    schema: v13
    index:
    prefix: index_
    period: 24h

storage_config:
tsdb_shipper:
active_index_directory: /loki/index
cache_location: /loki/index_cache
aws:
bucketnames: lokistorage

endpoint: https://nyc3.digitaloceanspaces.com
region: nyc3
access_key_id: "my-access-key"
secret_access_key: "secret-key"
insecure: false
http_config:
  idle_conn_timeout: 90s
  response_header_timeout: 0s
  insecure_skip_verify: false
s3forcepathstyle: true

pattern_ingester:
enabled: true
metric_aggregation:
loki_address: localhost:3100

ruler:
alertmanager_url: http://localhost:9093

frontend:
encoding: protobuf

querier:
engine:

If you don’t see any log older than 2 hours, then either your cluster can’t access the storage bucket while reading, or the chunk files aren’t stored to the bucket correctly. I would check:

  1. First look at the storage bucket and see if chunk files are actually written there.
  2. Check both your ingester and querier logs and see if there is anything there.
1 Like