Search code examples
apache-kafkaapache-flinkflink-streaming

Apache Flink & Kafka FETCH_SESSION_ID_NOT_FOUND info logs


Our Flink application has a Kafka datasource.

Application is run with 32 parallelism.

When I look at the logs, I see a lot of statements about FETCH_SESSION_ID_NOT_FOUND.

2020-05-04 11:04:47,753 INFO  org.apache.kafka.clients.FetchSessionHandler                  - [Consumer clientId=consumer-81, groupId=sampleGroup]
Node 26 was unable to process the fetch request with (sessionId=439766827, epoch=42): FETCH_SESSION_ID_NOT_FOUND.
2020-05-04 11:04:48,230 INFO  org.apache.kafka.clients.FetchSessionHandler                  - [Consumer clientId=consumer-78, groupId=sampleGroup]
Node 28 was unable to process the fetch request with (sessionId=281654250, epoch=42): FETCH_SESSION_ID_NOT_FOUND.

What do these log statements mean?

What are the possible negative effects?

Not: I have no experience with Apache Kafka

Thanks..


Solution

  • This can happen for a few reasons but the most common one is the FetchSession cache being full on the brokers.

    By default, brokers cache up to 1000 FetchSessions (configured via max.incremental.fetch.session.cache.slots). When this fills up, brokers cam evict cache entries. If your client cache entry is gone, it will received the FETCH_SESSION_ID_NOT_FOUND error.

    This error is not fatal and consumers should send a new full FetchRequest automatically and keep working.

    You can check the size of the FetchSession cache using the kafka.server:type=FetchSessionCache,name=NumIncrementalFetchSessions metric.