[jira] [Commented] (KAFKA-9603) Number of open files keeps increasing in Streams application
[ https://issues.apache.org/jira/browse/KAFKA-9603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17044774#comment-17044774 ] Sophie Blee-Goldman commented on KAFKA-9603: Hey [~biljazovic], can you tell if this happened during restoration or were there a large number of unclosed files long after it resumed processing? The reason I ask is that during restoration Streams toggles on "bulk loading" mode which involves turning off auto-compaction and dumping all the data from the changelog into (uncompacted) L0 files. These are the first level files and tend to be relatively small, so if you end up with a lot of them. Once restoration is done Streams will issue a manual compaction to merge these into a fewer number of larger files, but of course you can hit system limits before it completes if you have a lot of data to restore > Number of open files keeps increasing in Streams application > > > Key: KAFKA-9603 > URL: https://issues.apache.org/jira/browse/KAFKA-9603 > Project: Kafka > Issue Type: Bug > Components: streams >Affects Versions: 2.4.0, 2.3.1 > Environment: Spring Boot 2.2.4, OpenJDK 13, Centos image >Reporter: Bruno Iljazovic >Priority: Major > > Problem appeared when upgrading from *2.0.1* to *2.3.1*. > Relevant Kafka Streams code: > {code:java} > KStream events1 = > builder.stream(FIRST_TOPIC_NAME, Consumed.with(stringSerde, event1Serde, > event1TimestampExtractor(), null)) >.mapValues(...); > KStream events2 = > builder.stream(SECOND_TOPIC_NAME, Consumed.with(stringSerde, event2Serde, > event2TimestampExtractor(), null)) >.mapValues(...); > var joinWindows = JoinWindows.of(Duration.of(1, MINUTES).toMillis()) > .until(Duration.of(1, HOURS).toMillis()); > events2.join(events1, this::join, joinWindows, Joined.with(stringSerde, > event2Serde, event1Serde)) >.foreach(...); > {code} > Number of open *.sst files keeps increasing until eventually it hits the os > limit (65536) and causes this exception: > {code:java} > Caused by: org.rocksdb.RocksDBException: While open a file for appending: > /.../0_8/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.157943520/001354.sst: > Too many open files > at org.rocksdb.RocksDB.flush(Native Method) > at org.rocksdb.RocksDB.flush(RocksDB.java:2394) > {code} > Here are example files that are opened and never closed: > {code:java} > /.../0_27/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000114.sst > /.../0_27/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.158245920/65.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158215680/000115.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000112.sst > /.../0_31/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158185440/51.sst > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (KAFKA-9603) Number of open files keeps increasing in Streams application
[ https://issues.apache.org/jira/browse/KAFKA-9603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17045379#comment-17045379 ] Bruno Iljazovic commented on KAFKA-9603: [~ableegoldman] thank you on your reply. This happens after restoration, sometimes even after a day of processing new messages. > Number of open files keeps increasing in Streams application > > > Key: KAFKA-9603 > URL: https://issues.apache.org/jira/browse/KAFKA-9603 > Project: Kafka > Issue Type: Bug > Components: streams >Affects Versions: 2.4.0, 2.3.1 > Environment: Spring Boot 2.2.4, OpenJDK 13, Centos image >Reporter: Bruno Iljazovic >Priority: Major > > Problem appeared when upgrading from *2.0.1* to *2.3.1*. > Relevant Kafka Streams code: > {code:java} > KStream events1 = > builder.stream(FIRST_TOPIC_NAME, Consumed.with(stringSerde, event1Serde, > event1TimestampExtractor(), null)) >.mapValues(...); > KStream events2 = > builder.stream(SECOND_TOPIC_NAME, Consumed.with(stringSerde, event2Serde, > event2TimestampExtractor(), null)) >.mapValues(...); > var joinWindows = JoinWindows.of(Duration.of(1, MINUTES).toMillis()) > .until(Duration.of(1, HOURS).toMillis()); > events2.join(events1, this::join, joinWindows, Joined.with(stringSerde, > event2Serde, event1Serde)) >.foreach(...); > {code} > Number of open *.sst files keeps increasing until eventually it hits the os > limit (65536) and causes this exception: > {code:java} > Caused by: org.rocksdb.RocksDBException: While open a file for appending: > /.../0_8/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.157943520/001354.sst: > Too many open files > at org.rocksdb.RocksDB.flush(Native Method) > at org.rocksdb.RocksDB.flush(RocksDB.java:2394) > {code} > Here are example files that are opened and never closed: > {code:java} > /.../0_27/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000114.sst > /.../0_27/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.158245920/65.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158215680/000115.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000112.sst > /.../0_31/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158185440/51.sst > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (KAFKA-9603) Number of open files keeps increasing in Streams application
[ https://issues.apache.org/jira/browse/KAFKA-9603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17046169#comment-17046169 ] Sophie Blee-Goldman commented on KAFKA-9603: Admittedly a day does seem like a long time, but the rocksdb background compaction may merge the small L0 files less aggressively once they're under a certain threshold...just a wild guess. Do you mean the large number of files continues to grow up to 24hr after restoration completes, or just that it goes up during restoration and doesn't go back down again for a day? If you can increase the limit I'd recommend starting there, if you have a large number of stores/task or tasks/instance then the open files can really build up. > Number of open files keeps increasing in Streams application > > > Key: KAFKA-9603 > URL: https://issues.apache.org/jira/browse/KAFKA-9603 > Project: Kafka > Issue Type: Bug > Components: streams >Affects Versions: 2.4.0, 2.3.1 > Environment: Spring Boot 2.2.4, OpenJDK 13, Centos image >Reporter: Bruno Iljazovic >Priority: Major > > Problem appeared when upgrading from *2.0.1* to *2.3.1*. > Relevant Kafka Streams code: > {code:java} > KStream events1 = > builder.stream(FIRST_TOPIC_NAME, Consumed.with(stringSerde, event1Serde, > event1TimestampExtractor(), null)) >.mapValues(...); > KStream events2 = > builder.stream(SECOND_TOPIC_NAME, Consumed.with(stringSerde, event2Serde, > event2TimestampExtractor(), null)) >.mapValues(...); > var joinWindows = JoinWindows.of(Duration.of(1, MINUTES).toMillis()) > .until(Duration.of(1, HOURS).toMillis()); > events2.join(events1, this::join, joinWindows, Joined.with(stringSerde, > event2Serde, event1Serde)) >.foreach(...); > {code} > Number of open *.sst files keeps increasing until eventually it hits the os > limit (65536) and causes this exception: > {code:java} > Caused by: org.rocksdb.RocksDBException: While open a file for appending: > /.../0_8/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.157943520/001354.sst: > Too many open files > at org.rocksdb.RocksDB.flush(Native Method) > at org.rocksdb.RocksDB.flush(RocksDB.java:2394) > {code} > Here are example files that are opened and never closed: > {code:java} > /.../0_27/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000114.sst > /.../0_27/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.158245920/65.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158215680/000115.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000112.sst > /.../0_31/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158185440/51.sst > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (KAFKA-9603) Number of open files keeps increasing in Streams application
[ https://issues.apache.org/jira/browse/KAFKA-9603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17046170#comment-17046170 ] Sophie Blee-Goldman commented on KAFKA-9603: Do you notice that some of the task directories, or some of the files within a task directory, are not being actively used and haven't been touched since the upgrade? > Number of open files keeps increasing in Streams application > > > Key: KAFKA-9603 > URL: https://issues.apache.org/jira/browse/KAFKA-9603 > Project: Kafka > Issue Type: Bug > Components: streams >Affects Versions: 2.4.0, 2.3.1 > Environment: Spring Boot 2.2.4, OpenJDK 13, Centos image >Reporter: Bruno Iljazovic >Priority: Major > > Problem appeared when upgrading from *2.0.1* to *2.3.1*. > Relevant Kafka Streams code: > {code:java} > KStream events1 = > builder.stream(FIRST_TOPIC_NAME, Consumed.with(stringSerde, event1Serde, > event1TimestampExtractor(), null)) >.mapValues(...); > KStream events2 = > builder.stream(SECOND_TOPIC_NAME, Consumed.with(stringSerde, event2Serde, > event2TimestampExtractor(), null)) >.mapValues(...); > var joinWindows = JoinWindows.of(Duration.of(1, MINUTES).toMillis()) > .until(Duration.of(1, HOURS).toMillis()); > events2.join(events1, this::join, joinWindows, Joined.with(stringSerde, > event2Serde, event1Serde)) >.foreach(...); > {code} > Number of open *.sst files keeps increasing until eventually it hits the os > limit (65536) and causes this exception: > {code:java} > Caused by: org.rocksdb.RocksDBException: While open a file for appending: > /.../0_8/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.157943520/001354.sst: > Too many open files > at org.rocksdb.RocksDB.flush(Native Method) > at org.rocksdb.RocksDB.flush(RocksDB.java:2394) > {code} > Here are example files that are opened and never closed: > {code:java} > /.../0_27/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000114.sst > /.../0_27/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.158245920/65.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158215680/000115.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000112.sst > /.../0_31/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158185440/51.sst > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (KAFKA-9603) Number of open files keeps increasing in Streams application
[ https://issues.apache.org/jira/browse/KAFKA-9603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17046775#comment-17046775 ] Bruno Iljazovic commented on KAFKA-9603: Number of open files grows at constant speed from low values - on version 2.0.1 it stays at around 3000, but on 2.3.1 and 2.4.0 it starts at about 3000 and goes up from there slowly, eventually hitting 60k. With that big of a difference I didn't think increasing the OS limit would help. Up until the limit is hit, new versions process messages in the same way as the old version. More things I noticed today: * Number of files is increasing only under odd-numbered tasks * numerous files are all under ~10K in size, and in the same directory they are all around the same file size, except for one or two which are >5M * Memory usage or CPU usage is not higher than on previous version I'm not sure if the same files that are opened at the beginning are still opened hours later, or if most of them are closed and new ones are opened. I'll have to check that tomorrow. > Number of open files keeps increasing in Streams application > > > Key: KAFKA-9603 > URL: https://issues.apache.org/jira/browse/KAFKA-9603 > Project: Kafka > Issue Type: Bug > Components: streams >Affects Versions: 2.4.0, 2.3.1 > Environment: Spring Boot 2.2.4, OpenJDK 13, Centos image >Reporter: Bruno Iljazovic >Priority: Major > > Problem appeared when upgrading from *2.0.1* to *2.3.1*. > Relevant Kafka Streams code: > {code:java} > KStream events1 = > builder.stream(FIRST_TOPIC_NAME, Consumed.with(stringSerde, event1Serde, > event1TimestampExtractor(), null)) >.mapValues(...); > KStream events2 = > builder.stream(SECOND_TOPIC_NAME, Consumed.with(stringSerde, event2Serde, > event2TimestampExtractor(), null)) >.mapValues(...); > var joinWindows = JoinWindows.of(Duration.of(1, MINUTES).toMillis()) > .until(Duration.of(1, HOURS).toMillis()); > events2.join(events1, this::join, joinWindows, Joined.with(stringSerde, > event2Serde, event1Serde)) >.foreach(...); > {code} > Number of open *.sst files keeps increasing until eventually it hits the os > limit (65536) and causes this exception: > {code:java} > Caused by: org.rocksdb.RocksDBException: While open a file for appending: > /.../0_8/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.157943520/001354.sst: > Too many open files > at org.rocksdb.RocksDB.flush(Native Method) > at org.rocksdb.RocksDB.flush(RocksDB.java:2394) > {code} > Here are example files that are opened and never closed: > {code:java} > /.../0_27/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000114.sst > /.../0_27/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.158245920/65.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158215680/000115.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000112.sst > /.../0_31/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158185440/51.sst > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (KAFKA-9603) Number of open files keeps increasing in Streams application
[ https://issues.apache.org/jira/browse/KAFKA-9603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17058145#comment-17058145 ] Sophie Blee-Goldman commented on KAFKA-9603: Hey [~biljazovic] any new info or results? It does seem like there may be something odd going on here. Also, just to clarify this occurred when upgrading Streams from 2.0 to 2.3 right? Is the "2.4" listed in the affected versions the broker version? > Number of open files keeps increasing in Streams application > > > Key: KAFKA-9603 > URL: https://issues.apache.org/jira/browse/KAFKA-9603 > Project: Kafka > Issue Type: Bug > Components: streams >Affects Versions: 2.4.0, 2.3.1 > Environment: Spring Boot 2.2.4, OpenJDK 13, Centos image >Reporter: Bruno Iljazovic >Priority: Major > > Problem appeared when upgrading from *2.0.1* to *2.3.1*. > Relevant Kafka Streams code: > {code:java} > KStream events1 = > builder.stream(FIRST_TOPIC_NAME, Consumed.with(stringSerde, event1Serde, > event1TimestampExtractor(), null)) >.mapValues(...); > KStream events2 = > builder.stream(SECOND_TOPIC_NAME, Consumed.with(stringSerde, event2Serde, > event2TimestampExtractor(), null)) >.mapValues(...); > var joinWindows = JoinWindows.of(Duration.of(1, MINUTES).toMillis()) > .until(Duration.of(1, HOURS).toMillis()); > events2.join(events1, this::join, joinWindows, Joined.with(stringSerde, > event2Serde, event1Serde)) >.foreach(...); > {code} > Number of open *.sst files keeps increasing until eventually it hits the os > limit (65536) and causes this exception: > {code:java} > Caused by: org.rocksdb.RocksDBException: While open a file for appending: > /.../0_8/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.157943520/001354.sst: > Too many open files > at org.rocksdb.RocksDB.flush(Native Method) > at org.rocksdb.RocksDB.flush(RocksDB.java:2394) > {code} > Here are example files that are opened and never closed: > {code:java} > /.../0_27/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000114.sst > /.../0_27/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.158245920/65.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158215680/000115.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000112.sst > /.../0_31/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158185440/51.sst > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (KAFKA-9603) Number of open files keeps increasing in Streams application
[ https://issues.apache.org/jira/browse/KAFKA-9603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17058646#comment-17058646 ] Bruno Iljazovic commented on KAFKA-9603: [~ableegoldman] Unfortunately no new info. Problems are in both Streams versions 2.3 and 2.4. Broker versions are 2.1.1.0, message format versions 2.1-IV2 > Number of open files keeps increasing in Streams application > > > Key: KAFKA-9603 > URL: https://issues.apache.org/jira/browse/KAFKA-9603 > Project: Kafka > Issue Type: Bug > Components: streams >Affects Versions: 2.4.0, 2.3.1 > Environment: Spring Boot 2.2.4, OpenJDK 13, Centos image >Reporter: Bruno Iljazovic >Priority: Major > > Problem appeared when upgrading from *2.0.1* to *2.3.1*. > Relevant Kafka Streams code: > {code:java} > KStream events1 = > builder.stream(FIRST_TOPIC_NAME, Consumed.with(stringSerde, event1Serde, > event1TimestampExtractor(), null)) >.mapValues(...); > KStream events2 = > builder.stream(SECOND_TOPIC_NAME, Consumed.with(stringSerde, event2Serde, > event2TimestampExtractor(), null)) >.mapValues(...); > var joinWindows = JoinWindows.of(Duration.of(1, MINUTES).toMillis()) > .until(Duration.of(1, HOURS).toMillis()); > events2.join(events1, this::join, joinWindows, Joined.with(stringSerde, > event2Serde, event1Serde)) >.foreach(...); > {code} > Number of open *.sst files keeps increasing until eventually it hits the os > limit (65536) and causes this exception: > {code:java} > Caused by: org.rocksdb.RocksDBException: While open a file for appending: > /.../0_8/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.157943520/001354.sst: > Too many open files > at org.rocksdb.RocksDB.flush(Native Method) > at org.rocksdb.RocksDB.flush(RocksDB.java:2394) > {code} > Here are example files that are opened and never closed: > {code:java} > /.../0_27/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000114.sst > /.../0_27/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.158245920/65.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158215680/000115.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000112.sst > /.../0_31/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158185440/51.sst > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (KAFKA-9603) Number of open files keeps increasing in Streams application
[ https://issues.apache.org/jira/browse/KAFKA-9603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17071090#comment-17071090 ] Bruno Iljazovic commented on KAFKA-9603: Tested with Kafka 2.1 and 2.2 (brokers unchanged), both have similar issues. Number of .sst files is increasing *only in every other* task directory. Also, files that are created and opened at the start are never closed until the crash. > Number of open files keeps increasing in Streams application > > > Key: KAFKA-9603 > URL: https://issues.apache.org/jira/browse/KAFKA-9603 > Project: Kafka > Issue Type: Bug > Components: streams >Affects Versions: 2.4.0, 2.3.1 > Environment: Spring Boot 2.2.4, OpenJDK 13, Centos image >Reporter: Bruno Iljazovic >Priority: Major > > Problem appeared when upgrading from *2.0.1* to *2.3.1*. > Relevant Kafka Streams code: > {code:java} > KStream events1 = > builder.stream(FIRST_TOPIC_NAME, Consumed.with(stringSerde, event1Serde, > event1TimestampExtractor(), null)) >.mapValues(...); > KStream events2 = > builder.stream(SECOND_TOPIC_NAME, Consumed.with(stringSerde, event2Serde, > event2TimestampExtractor(), null)) >.mapValues(...); > var joinWindows = JoinWindows.of(Duration.of(1, MINUTES).toMillis()) > .until(Duration.of(1, HOURS).toMillis()); > events2.join(events1, this::join, joinWindows, Joined.with(stringSerde, > event2Serde, event1Serde)) >.foreach(...); > {code} > Number of open *.sst files keeps increasing until eventually it hits the os > limit (65536) and causes this exception: > {code:java} > Caused by: org.rocksdb.RocksDBException: While open a file for appending: > /.../0_8/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.157943520/001354.sst: > Too many open files > at org.rocksdb.RocksDB.flush(Native Method) > at org.rocksdb.RocksDB.flush(RocksDB.java:2394) > {code} > Here are example files that are opened and never closed: > {code:java} > /.../0_27/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000114.sst > /.../0_27/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.158245920/65.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158215680/000115.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000112.sst > /.../0_31/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158185440/51.sst > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (KAFKA-9603) Number of open files keeps increasing in Streams application
[ https://issues.apache.org/jira/browse/KAFKA-9603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17079050#comment-17079050 ] Lovro Pandžić commented on KAFKA-9603: -- Hello, I took this task over from Bruno on the project. I've tried: * upgrading to 2.3 * upgrading to 2.4.1 * limiting number of open files with {color:#00}RocksDBConfigSetterForSeen{color} - options.setMaxOpenFiles() to 1000 and 1 Nothing helped and results are that one instance of the service keeps opening more files continuously at a relatively steady rate (around 6k per hour). > Number of open files keeps increasing in Streams application > > > Key: KAFKA-9603 > URL: https://issues.apache.org/jira/browse/KAFKA-9603 > Project: Kafka > Issue Type: Bug > Components: streams >Affects Versions: 2.4.0, 2.3.1 > Environment: Spring Boot 2.2.4, OpenJDK 13, Centos image >Reporter: Bruno Iljazovic >Priority: Major > > Problem appeared when upgrading from *2.0.1* to *2.3.1*. > Relevant Kafka Streams code: > {code:java} > KStream events1 = > builder.stream(FIRST_TOPIC_NAME, Consumed.with(stringSerde, event1Serde, > event1TimestampExtractor(), null)) >.mapValues(...); > KStream events2 = > builder.stream(SECOND_TOPIC_NAME, Consumed.with(stringSerde, event2Serde, > event2TimestampExtractor(), null)) >.mapValues(...); > var joinWindows = JoinWindows.of(Duration.of(1, MINUTES).toMillis()) > .until(Duration.of(1, HOURS).toMillis()); > events2.join(events1, this::join, joinWindows, Joined.with(stringSerde, > event2Serde, event1Serde)) >.foreach(...); > {code} > Number of open *.sst files keeps increasing until eventually it hits the os > limit (65536) and causes this exception: > {code:java} > Caused by: org.rocksdb.RocksDBException: While open a file for appending: > /.../0_8/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.157943520/001354.sst: > Too many open files > at org.rocksdb.RocksDB.flush(Native Method) > at org.rocksdb.RocksDB.flush(RocksDB.java:2394) > {code} > Here are example files that are opened and never closed: > {code:java} > /.../0_27/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000114.sst > /.../0_27/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.158245920/65.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158215680/000115.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000112.sst > /.../0_31/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158185440/51.sst > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (KAFKA-9603) Number of open files keeps increasing in Streams application
[ https://issues.apache.org/jira/browse/KAFKA-9603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17079588#comment-17079588 ] Guozhang Wang commented on KAFKA-9603: -- [~lpandzic] Thanks for the update, we will try to reproduce the observed issue first and then try to see if some leads can be found. > Number of open files keeps increasing in Streams application > > > Key: KAFKA-9603 > URL: https://issues.apache.org/jira/browse/KAFKA-9603 > Project: Kafka > Issue Type: Bug > Components: streams >Affects Versions: 2.4.0, 2.3.1 > Environment: Spring Boot 2.2.4, OpenJDK 13, Centos image >Reporter: Bruno Iljazovic >Priority: Major > > Problem appeared when upgrading from *2.0.1* to *2.3.1*. > Relevant Kafka Streams code: > {code:java} > KStream events1 = > builder.stream(FIRST_TOPIC_NAME, Consumed.with(stringSerde, event1Serde, > event1TimestampExtractor(), null)) >.mapValues(...); > KStream events2 = > builder.stream(SECOND_TOPIC_NAME, Consumed.with(stringSerde, event2Serde, > event2TimestampExtractor(), null)) >.mapValues(...); > var joinWindows = JoinWindows.of(Duration.of(1, MINUTES).toMillis()) > .until(Duration.of(1, HOURS).toMillis()); > events2.join(events1, this::join, joinWindows, Joined.with(stringSerde, > event2Serde, event1Serde)) >.foreach(...); > {code} > Number of open *.sst files keeps increasing until eventually it hits the os > limit (65536) and causes this exception: > {code:java} > Caused by: org.rocksdb.RocksDBException: While open a file for appending: > /.../0_8/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.157943520/001354.sst: > Too many open files > at org.rocksdb.RocksDB.flush(Native Method) > at org.rocksdb.RocksDB.flush(RocksDB.java:2394) > {code} > Here are example files that are opened and never closed: > {code:java} > /.../0_27/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000114.sst > /.../0_27/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.158245920/65.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158215680/000115.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000112.sst > /.../0_31/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158185440/51.sst > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (KAFKA-9603) Number of open files keeps increasing in Streams application
[ https://issues.apache.org/jira/browse/KAFKA-9603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17080229#comment-17080229 ] Lovro Pandžić commented on KAFKA-9603: -- Thanks, it seems I've been able to reproduce the issue on our test environment. I'll try to reproduce it locally and isolate the cause as much as possible, ideally I'll be able to share a project that reproduces the issue. > Number of open files keeps increasing in Streams application > > > Key: KAFKA-9603 > URL: https://issues.apache.org/jira/browse/KAFKA-9603 > Project: Kafka > Issue Type: Bug > Components: streams >Affects Versions: 2.4.0, 2.3.1 > Environment: Spring Boot 2.2.4, OpenJDK 13, Centos image >Reporter: Bruno Iljazovic >Priority: Major > > Problem appeared when upgrading from *2.0.1* to *2.3.1*. > Relevant Kafka Streams code: > {code:java} > KStream events1 = > builder.stream(FIRST_TOPIC_NAME, Consumed.with(stringSerde, event1Serde, > event1TimestampExtractor(), null)) >.mapValues(...); > KStream events2 = > builder.stream(SECOND_TOPIC_NAME, Consumed.with(stringSerde, event2Serde, > event2TimestampExtractor(), null)) >.mapValues(...); > var joinWindows = JoinWindows.of(Duration.of(1, MINUTES).toMillis()) > .until(Duration.of(1, HOURS).toMillis()); > events2.join(events1, this::join, joinWindows, Joined.with(stringSerde, > event2Serde, event1Serde)) >.foreach(...); > {code} > Number of open *.sst files keeps increasing until eventually it hits the os > limit (65536) and causes this exception: > {code:java} > Caused by: org.rocksdb.RocksDBException: While open a file for appending: > /.../0_8/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.157943520/001354.sst: > Too many open files > at org.rocksdb.RocksDB.flush(Native Method) > at org.rocksdb.RocksDB.flush(RocksDB.java:2394) > {code} > Here are example files that are opened and never closed: > {code:java} > /.../0_27/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000114.sst > /.../0_27/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.158245920/65.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158215680/000115.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000112.sst > /.../0_31/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158185440/51.sst > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (KAFKA-9603) Number of open files keeps increasing in Streams application
[ https://issues.apache.org/jira/browse/KAFKA-9603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17080887#comment-17080887 ] Guozhang Wang commented on KAFKA-9603: -- Great, thanks! I'd be waiting for you to share the mini project then :) > Number of open files keeps increasing in Streams application > > > Key: KAFKA-9603 > URL: https://issues.apache.org/jira/browse/KAFKA-9603 > Project: Kafka > Issue Type: Bug > Components: streams >Affects Versions: 2.4.0, 2.3.1 > Environment: Spring Boot 2.2.4, OpenJDK 13, Centos image >Reporter: Bruno Iljazovic >Priority: Major > > Problem appeared when upgrading from *2.0.1* to *2.3.1*. > Relevant Kafka Streams code: > {code:java} > KStream events1 = > builder.stream(FIRST_TOPIC_NAME, Consumed.with(stringSerde, event1Serde, > event1TimestampExtractor(), null)) >.mapValues(...); > KStream events2 = > builder.stream(SECOND_TOPIC_NAME, Consumed.with(stringSerde, event2Serde, > event2TimestampExtractor(), null)) >.mapValues(...); > var joinWindows = JoinWindows.of(Duration.of(1, MINUTES).toMillis()) > .until(Duration.of(1, HOURS).toMillis()); > events2.join(events1, this::join, joinWindows, Joined.with(stringSerde, > event2Serde, event1Serde)) >.foreach(...); > {code} > Number of open *.sst files keeps increasing until eventually it hits the os > limit (65536) and causes this exception: > {code:java} > Caused by: org.rocksdb.RocksDBException: While open a file for appending: > /.../0_8/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.157943520/001354.sst: > Too many open files > at org.rocksdb.RocksDB.flush(Native Method) > at org.rocksdb.RocksDB.flush(RocksDB.java:2394) > {code} > Here are example files that are opened and never closed: > {code:java} > /.../0_27/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000114.sst > /.../0_27/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.158245920/65.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158215680/000115.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000112.sst > /.../0_31/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158185440/51.sst > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (KAFKA-9603) Number of open files keeps increasing in Streams application
[ https://issues.apache.org/jira/browse/KAFKA-9603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17085556#comment-17085556 ] Abhishek Kumar commented on KAFKA-9603: --- [~lpandzic] Something related while using Confluent ksql. ksql is built using kafka streams. - [https://github.com/confluentinc/ksql/issues/5057] > Number of open files keeps increasing in Streams application > > > Key: KAFKA-9603 > URL: https://issues.apache.org/jira/browse/KAFKA-9603 > Project: Kafka > Issue Type: Bug > Components: streams >Affects Versions: 2.4.0, 2.3.1 > Environment: Spring Boot 2.2.4, OpenJDK 13, Centos image >Reporter: Bruno Iljazovic >Priority: Major > > Problem appeared when upgrading from *2.0.1* to *2.3.1*. > Relevant Kafka Streams code: > {code:java} > KStream events1 = > builder.stream(FIRST_TOPIC_NAME, Consumed.with(stringSerde, event1Serde, > event1TimestampExtractor(), null)) >.mapValues(...); > KStream events2 = > builder.stream(SECOND_TOPIC_NAME, Consumed.with(stringSerde, event2Serde, > event2TimestampExtractor(), null)) >.mapValues(...); > var joinWindows = JoinWindows.of(Duration.of(1, MINUTES).toMillis()) > .until(Duration.of(1, HOURS).toMillis()); > events2.join(events1, this::join, joinWindows, Joined.with(stringSerde, > event2Serde, event1Serde)) >.foreach(...); > {code} > Number of open *.sst files keeps increasing until eventually it hits the os > limit (65536) and causes this exception: > {code:java} > Caused by: org.rocksdb.RocksDBException: While open a file for appending: > /.../0_8/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.157943520/001354.sst: > Too many open files > at org.rocksdb.RocksDB.flush(Native Method) > at org.rocksdb.RocksDB.flush(RocksDB.java:2394) > {code} > Here are example files that are opened and never closed: > {code:java} > /.../0_27/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000114.sst > /.../0_27/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.158245920/65.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158215680/000115.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000112.sst > /.../0_31/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158185440/51.sst > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (KAFKA-9603) Number of open files keeps increasing in Streams application
[ https://issues.apache.org/jira/browse/KAFKA-9603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17090649#comment-17090649 ] Lovro Pandžić commented on KAFKA-9603: -- Sadly, I've been unable to reproduce the issue locally. On production however I was able to isolate the issue to upgrade of kafka-streams from 2.1.1 to 2.2.0. > Number of open files keeps increasing in Streams application > > > Key: KAFKA-9603 > URL: https://issues.apache.org/jira/browse/KAFKA-9603 > Project: Kafka > Issue Type: Bug > Components: streams >Affects Versions: 2.4.0, 2.3.1 > Environment: Spring Boot 2.2.4, OpenJDK 13, Centos image >Reporter: Bruno Iljazovic >Priority: Major > > Problem appeared when upgrading from *2.0.1* to *2.3.1*. > Relevant Kafka Streams code: > {code:java} > KStream events1 = > builder.stream(FIRST_TOPIC_NAME, Consumed.with(stringSerde, event1Serde, > event1TimestampExtractor(), null)) >.mapValues(...); > KStream events2 = > builder.stream(SECOND_TOPIC_NAME, Consumed.with(stringSerde, event2Serde, > event2TimestampExtractor(), null)) >.mapValues(...); > var joinWindows = JoinWindows.of(Duration.of(1, MINUTES).toMillis()) > .until(Duration.of(1, HOURS).toMillis()); > events2.join(events1, this::join, joinWindows, Joined.with(stringSerde, > event2Serde, event1Serde)) >.foreach(...); > {code} > Number of open *.sst files keeps increasing until eventually it hits the os > limit (65536) and causes this exception: > {code:java} > Caused by: org.rocksdb.RocksDBException: While open a file for appending: > /.../0_8/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.157943520/001354.sst: > Too many open files > at org.rocksdb.RocksDB.flush(Native Method) > at org.rocksdb.RocksDB.flush(RocksDB.java:2394) > {code} > Here are example files that are opened and never closed: > {code:java} > /.../0_27/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000114.sst > /.../0_27/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.158245920/65.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158215680/000115.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000112.sst > /.../0_31/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158185440/51.sst > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (KAFKA-9603) Number of open files keeps increasing in Streams application
[ https://issues.apache.org/jira/browse/KAFKA-9603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17090715#comment-17090715 ] Bruno Cadonna commented on KAFKA-9603: -- [~lpandzic] Thank you for the information. In the description is stated ??Problem appeared when upgrading from 2.0.1 to 2.3.1.?? I guess you investigated more and you could restrict the issue to the upgrade from 2.1.1 to 2.2.0. Is this correct? I checked the RocksDB versions of this two Kafka Streams versions. Kafka Streams 2.1.1 uses RocksDB 5.14.2. Kafka Streams 2.2.0 uses RocksDB 5.15.10. > Number of open files keeps increasing in Streams application > > > Key: KAFKA-9603 > URL: https://issues.apache.org/jira/browse/KAFKA-9603 > Project: Kafka > Issue Type: Bug > Components: streams >Affects Versions: 2.4.0, 2.3.1 > Environment: Spring Boot 2.2.4, OpenJDK 13, Centos image >Reporter: Bruno Iljazovic >Priority: Major > > Problem appeared when upgrading from *2.0.1* to *2.3.1*. > Relevant Kafka Streams code: > {code:java} > KStream events1 = > builder.stream(FIRST_TOPIC_NAME, Consumed.with(stringSerde, event1Serde, > event1TimestampExtractor(), null)) >.mapValues(...); > KStream events2 = > builder.stream(SECOND_TOPIC_NAME, Consumed.with(stringSerde, event2Serde, > event2TimestampExtractor(), null)) >.mapValues(...); > var joinWindows = JoinWindows.of(Duration.of(1, MINUTES).toMillis()) > .until(Duration.of(1, HOURS).toMillis()); > events2.join(events1, this::join, joinWindows, Joined.with(stringSerde, > event2Serde, event1Serde)) >.foreach(...); > {code} > Number of open *.sst files keeps increasing until eventually it hits the os > limit (65536) and causes this exception: > {code:java} > Caused by: org.rocksdb.RocksDBException: While open a file for appending: > /.../0_8/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.157943520/001354.sst: > Too many open files > at org.rocksdb.RocksDB.flush(Native Method) > at org.rocksdb.RocksDB.flush(RocksDB.java:2394) > {code} > Here are example files that are opened and never closed: > {code:java} > /.../0_27/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000114.sst > /.../0_27/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.158245920/65.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158215680/000115.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000112.sst > /.../0_31/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158185440/51.sst > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (KAFKA-9603) Number of open files keeps increasing in Streams application
[ https://issues.apache.org/jira/browse/KAFKA-9603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17091641#comment-17091641 ] Lovro Pandžić commented on KAFKA-9603: -- Yes, that's what I meant but [~biljazovic] warned me about some other circumstances... Our application is running inside docker with rocksdb stateDir volume mapped to host. On kafka-streams 2.2.0 with `lsof` the problem is visible from within the container (raising number of file descriptors). On kafka-streams 2.1.0 and 2.1.1 'lsof' is stable from within the container, but not on from host, lsof on host exhibits similar behavior and rising of descriptors. Number of files problem is present on both (versions and host/container). > Number of open files keeps increasing in Streams application > > > Key: KAFKA-9603 > URL: https://issues.apache.org/jira/browse/KAFKA-9603 > Project: Kafka > Issue Type: Bug > Components: streams >Affects Versions: 2.4.0, 2.3.1 > Environment: Spring Boot 2.2.4, OpenJDK 13, Centos image >Reporter: Bruno Iljazovic >Priority: Major > > Problem appeared when upgrading from *2.0.1* to *2.3.1*. > Relevant Kafka Streams code: > {code:java} > KStream events1 = > builder.stream(FIRST_TOPIC_NAME, Consumed.with(stringSerde, event1Serde, > event1TimestampExtractor(), null)) >.mapValues(...); > KStream events2 = > builder.stream(SECOND_TOPIC_NAME, Consumed.with(stringSerde, event2Serde, > event2TimestampExtractor(), null)) >.mapValues(...); > var joinWindows = JoinWindows.of(Duration.of(1, MINUTES).toMillis()) > .until(Duration.of(1, HOURS).toMillis()); > events2.join(events1, this::join, joinWindows, Joined.with(stringSerde, > event2Serde, event1Serde)) >.foreach(...); > {code} > Number of open *.sst files keeps increasing until eventually it hits the os > limit (65536) and causes this exception: > {code:java} > Caused by: org.rocksdb.RocksDBException: While open a file for appending: > /.../0_8/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.157943520/001354.sst: > Too many open files > at org.rocksdb.RocksDB.flush(Native Method) > at org.rocksdb.RocksDB.flush(RocksDB.java:2394) > {code} > Here are example files that are opened and never closed: > {code:java} > /.../0_27/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000114.sst > /.../0_27/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.158245920/65.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158215680/000115.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000112.sst > /.../0_31/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158185440/51.sst > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (KAFKA-9603) Number of open files keeps increasing in Streams application
[ https://issues.apache.org/jira/browse/KAFKA-9603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17091707#comment-17091707 ] Lovro Pandžić commented on KAFKA-9603: -- Small update: I've been able to reproduce the last problem even with kafka-streams 2.0.1 and rocksdb 5.14.2 so it seems the problem is down to rocksdb... > Number of open files keeps increasing in Streams application > > > Key: KAFKA-9603 > URL: https://issues.apache.org/jira/browse/KAFKA-9603 > Project: Kafka > Issue Type: Bug > Components: streams >Affects Versions: 2.4.0, 2.3.1 > Environment: Spring Boot 2.2.4, OpenJDK 13, Centos image >Reporter: Bruno Iljazovic >Priority: Major > > Problem appeared when upgrading from *2.0.1* to *2.3.1*. > Relevant Kafka Streams code: > {code:java} > KStream events1 = > builder.stream(FIRST_TOPIC_NAME, Consumed.with(stringSerde, event1Serde, > event1TimestampExtractor(), null)) >.mapValues(...); > KStream events2 = > builder.stream(SECOND_TOPIC_NAME, Consumed.with(stringSerde, event2Serde, > event2TimestampExtractor(), null)) >.mapValues(...); > var joinWindows = JoinWindows.of(Duration.of(1, MINUTES).toMillis()) > .until(Duration.of(1, HOURS).toMillis()); > events2.join(events1, this::join, joinWindows, Joined.with(stringSerde, > event2Serde, event1Serde)) >.foreach(...); > {code} > Number of open *.sst files keeps increasing until eventually it hits the os > limit (65536) and causes this exception: > {code:java} > Caused by: org.rocksdb.RocksDBException: While open a file for appending: > /.../0_8/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.157943520/001354.sst: > Too many open files > at org.rocksdb.RocksDB.flush(Native Method) > at org.rocksdb.RocksDB.flush(RocksDB.java:2394) > {code} > Here are example files that are opened and never closed: > {code:java} > /.../0_27/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000114.sst > /.../0_27/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.158245920/65.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158215680/000115.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000112.sst > /.../0_31/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158185440/51.sst > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (KAFKA-9603) Number of open files keeps increasing in Streams application
[ https://issues.apache.org/jira/browse/KAFKA-9603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17093228#comment-17093228 ] Lovro Pandžić commented on KAFKA-9603: -- I've created a public github repository that reproduces the issue - [https://github.com/lpandzic/kafka-9603.] To reproduce follow the steps in README.md. > Number of open files keeps increasing in Streams application > > > Key: KAFKA-9603 > URL: https://issues.apache.org/jira/browse/KAFKA-9603 > Project: Kafka > Issue Type: Bug > Components: streams >Affects Versions: 2.4.0, 2.3.1 > Environment: Spring Boot 2.2.4, OpenJDK 13, Centos image >Reporter: Bruno Iljazovic >Priority: Major > > Problem appeared when upgrading from *2.0.1* to *2.3.1*. > Relevant Kafka Streams code: > {code:java} > KStream events1 = > builder.stream(FIRST_TOPIC_NAME, Consumed.with(stringSerde, event1Serde, > event1TimestampExtractor(), null)) >.mapValues(...); > KStream events2 = > builder.stream(SECOND_TOPIC_NAME, Consumed.with(stringSerde, event2Serde, > event2TimestampExtractor(), null)) >.mapValues(...); > var joinWindows = JoinWindows.of(Duration.of(1, MINUTES).toMillis()) > .until(Duration.of(1, HOURS).toMillis()); > events2.join(events1, this::join, joinWindows, Joined.with(stringSerde, > event2Serde, event1Serde)) >.foreach(...); > {code} > Number of open *.sst files keeps increasing until eventually it hits the os > limit (65536) and causes this exception: > {code:java} > Caused by: org.rocksdb.RocksDBException: While open a file for appending: > /.../0_8/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.157943520/001354.sst: > Too many open files > at org.rocksdb.RocksDB.flush(Native Method) > at org.rocksdb.RocksDB.flush(RocksDB.java:2394) > {code} > Here are example files that are opened and never closed: > {code:java} > /.../0_27/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000114.sst > /.../0_27/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.158245920/65.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158215680/000115.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000112.sst > /.../0_31/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158185440/51.sst > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (KAFKA-9603) Number of open files keeps increasing in Streams application
[ https://issues.apache.org/jira/browse/KAFKA-9603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17093312#comment-17093312 ] Bruno Iljazovic commented on KAFKA-9603: To expand on this, it seems that RocksDB version doesn't affect this problem. Instead, from Streams version 2.1.0 on, when two instances of consumer applications are started, auto compaction in RocksDB is disabled for *standby tasks* on both instances. Furthermore, when one instance is paused, then resumed, then same with the other instance, both instances compact their stores normally. > Number of open files keeps increasing in Streams application > > > Key: KAFKA-9603 > URL: https://issues.apache.org/jira/browse/KAFKA-9603 > Project: Kafka > Issue Type: Bug > Components: streams >Affects Versions: 2.4.0, 2.3.1 > Environment: Spring Boot 2.2.4, OpenJDK 13, Centos image >Reporter: Bruno Iljazovic >Priority: Major > > Problem appeared when upgrading from *2.0.1* to *2.3.1*. > Relevant Kafka Streams code: > {code:java} > KStream events1 = > builder.stream(FIRST_TOPIC_NAME, Consumed.with(stringSerde, event1Serde, > event1TimestampExtractor(), null)) >.mapValues(...); > KStream events2 = > builder.stream(SECOND_TOPIC_NAME, Consumed.with(stringSerde, event2Serde, > event2TimestampExtractor(), null)) >.mapValues(...); > var joinWindows = JoinWindows.of(Duration.of(1, MINUTES).toMillis()) > .until(Duration.of(1, HOURS).toMillis()); > events2.join(events1, this::join, joinWindows, Joined.with(stringSerde, > event2Serde, event1Serde)) >.foreach(...); > {code} > Number of open *.sst files keeps increasing until eventually it hits the os > limit (65536) and causes this exception: > {code:java} > Caused by: org.rocksdb.RocksDBException: While open a file for appending: > /.../0_8/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.157943520/001354.sst: > Too many open files > at org.rocksdb.RocksDB.flush(Native Method) > at org.rocksdb.RocksDB.flush(RocksDB.java:2394) > {code} > Here are example files that are opened and never closed: > {code:java} > /.../0_27/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000114.sst > /.../0_27/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.158245920/65.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158215680/000115.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000112.sst > /.../0_31/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158185440/51.sst > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (KAFKA-9603) Number of open files keeps increasing in Streams application
[ https://issues.apache.org/jira/browse/KAFKA-9603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17093749#comment-17093749 ] Guozhang Wang commented on KAFKA-9603: -- Thanks for uploading the reproduction repo guys! It indeed seems like regression bug. > Number of open files keeps increasing in Streams application > > > Key: KAFKA-9603 > URL: https://issues.apache.org/jira/browse/KAFKA-9603 > Project: Kafka > Issue Type: Bug > Components: streams >Affects Versions: 2.1.0, 2.2.0, 2.4.0, 2.3.1 > Environment: Spring Boot 2.2.4, OpenJDK 13, Centos image >Reporter: Bruno Iljazovic >Priority: Major > > Problem appeared when upgrading from *2.0.1* to *2.3.1*. > Relevant Kafka Streams code: > {code:java} > KStream events1 = > builder.stream(FIRST_TOPIC_NAME, Consumed.with(stringSerde, event1Serde, > event1TimestampExtractor(), null)) >.mapValues(...); > KStream events2 = > builder.stream(SECOND_TOPIC_NAME, Consumed.with(stringSerde, event2Serde, > event2TimestampExtractor(), null)) >.mapValues(...); > var joinWindows = JoinWindows.of(Duration.of(1, MINUTES).toMillis()) > .until(Duration.of(1, HOURS).toMillis()); > events2.join(events1, this::join, joinWindows, Joined.with(stringSerde, > event2Serde, event1Serde)) >.foreach(...); > {code} > Number of open *.sst files keeps increasing until eventually it hits the os > limit (65536) and causes this exception: > {code:java} > Caused by: org.rocksdb.RocksDBException: While open a file for appending: > /.../0_8/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.157943520/001354.sst: > Too many open files > at org.rocksdb.RocksDB.flush(Native Method) > at org.rocksdb.RocksDB.flush(RocksDB.java:2394) > {code} > Here are example files that are opened and never closed: > {code:java} > /.../0_27/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000114.sst > /.../0_27/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.158245920/65.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158215680/000115.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000112.sst > /.../0_31/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158185440/51.sst > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (KAFKA-9603) Number of open files keeps increasing in Streams application
[ https://issues.apache.org/jira/browse/KAFKA-9603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17097996#comment-17097996 ] Rens Groothuijsen commented on KAFKA-9603: -- [~biljazovic] It does indeed appear to affect standby tasks only. When I run the reproduction but leave num.standby.replicas at 0, the numbers remain relatively stable. > Number of open files keeps increasing in Streams application > > > Key: KAFKA-9603 > URL: https://issues.apache.org/jira/browse/KAFKA-9603 > Project: Kafka > Issue Type: Bug > Components: streams >Affects Versions: 2.1.0, 2.2.0, 2.4.0, 2.3.1 > Environment: Spring Boot 2.2.4, OpenJDK 13, Centos image >Reporter: Bruno Iljazovic >Priority: Major > > Problem appeared when upgrading from *2.0.1* to *2.3.1*. > Relevant Kafka Streams code: > {code:java} > KStream events1 = > builder.stream(FIRST_TOPIC_NAME, Consumed.with(stringSerde, event1Serde, > event1TimestampExtractor(), null)) >.mapValues(...); > KStream events2 = > builder.stream(SECOND_TOPIC_NAME, Consumed.with(stringSerde, event2Serde, > event2TimestampExtractor(), null)) >.mapValues(...); > var joinWindows = JoinWindows.of(Duration.of(1, MINUTES).toMillis()) > .until(Duration.of(1, HOURS).toMillis()); > events2.join(events1, this::join, joinWindows, Joined.with(stringSerde, > event2Serde, event1Serde)) >.foreach(...); > {code} > Number of open *.sst files keeps increasing until eventually it hits the os > limit (65536) and causes this exception: > {code:java} > Caused by: org.rocksdb.RocksDBException: While open a file for appending: > /.../0_8/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.157943520/001354.sst: > Too many open files > at org.rocksdb.RocksDB.flush(Native Method) > at org.rocksdb.RocksDB.flush(RocksDB.java:2394) > {code} > Here are example files that are opened and never closed: > {code:java} > /.../0_27/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000114.sst > /.../0_27/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.158245920/65.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158215680/000115.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000112.sst > /.../0_31/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158185440/51.sst > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (KAFKA-9603) Number of open files keeps increasing in Streams application
[ https://issues.apache.org/jira/browse/KAFKA-9603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17105703#comment-17105703 ] Bruno Cadonna commented on KAFKA-9603: -- I think I found the cause of this issue. With segmented state stores (i.e., state stores used to store windowed data), bulk loading mode of RocksDB might be turned on but never off on stand-by tasks. I opened the following PR with a fix: https://github.com/apache/kafka/pull/8661 > Number of open files keeps increasing in Streams application > > > Key: KAFKA-9603 > URL: https://issues.apache.org/jira/browse/KAFKA-9603 > Project: Kafka > Issue Type: Bug > Components: streams >Affects Versions: 2.1.0, 2.2.0, 2.4.0, 2.3.1 > Environment: Spring Boot 2.2.4, OpenJDK 13, Centos image >Reporter: Bruno Iljazovic >Assignee: Bruno Cadonna >Priority: Major > > Problem appeared when upgrading from *2.0.1* to *2.3.1*. > Relevant Kafka Streams code: > {code:java} > KStream events1 = > builder.stream(FIRST_TOPIC_NAME, Consumed.with(stringSerde, event1Serde, > event1TimestampExtractor(), null)) >.mapValues(...); > KStream events2 = > builder.stream(SECOND_TOPIC_NAME, Consumed.with(stringSerde, event2Serde, > event2TimestampExtractor(), null)) >.mapValues(...); > var joinWindows = JoinWindows.of(Duration.of(1, MINUTES).toMillis()) > .until(Duration.of(1, HOURS).toMillis()); > events2.join(events1, this::join, joinWindows, Joined.with(stringSerde, > event2Serde, event1Serde)) >.foreach(...); > {code} > Number of open *.sst files keeps increasing until eventually it hits the os > limit (65536) and causes this exception: > {code:java} > Caused by: org.rocksdb.RocksDBException: While open a file for appending: > /.../0_8/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.157943520/001354.sst: > Too many open files > at org.rocksdb.RocksDB.flush(Native Method) > at org.rocksdb.RocksDB.flush(RocksDB.java:2394) > {code} > Here are example files that are opened and never closed: > {code:java} > /.../0_27/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000114.sst > /.../0_27/KSTREAM-JOINOTHER-10-store/KSTREAM-JOINOTHER-10-store.158245920/65.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158215680/000115.sst > /.../0_29/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158245920/000112.sst > /.../0_31/KSTREAM-JOINTHIS-09-store/KSTREAM-JOINTHIS-09-store.158185440/51.sst > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)