{"id":6490,"date":"2021-08-08T20:14:18","date_gmt":"2021-08-08T14:44:18","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=6490"},"modified":"2021-08-08T20:14:20","modified_gmt":"2021-08-08T14:44:20","slug":"error-error-while-accepting-connection-kafka-network-acceptor-java-io-ioexception-too-many-open-files","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/error-error-while-accepting-connection-kafka-network-acceptor-java-io-ioexception-too-many-open-files\/","title":{"rendered":"ERROR Error while accepting connection (kafka.network.Acceptor) java.io.IOException: Too many open files"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Please follow the below steps when you get the above error.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I got this error in KAFKA and everytime its getting down due to this.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In Kafka, every topic is (optionally) split into many partitions. For each partition some files are maintained by brokers (for index and actual data).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">kafka-topics &#8211;zookeeper localhost:2181 &#8211;describe &#8211;topic topic_name<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The above command will give you the number of partitions for topic\u00a0<code>topic_name<\/code>. The default number of partitions per topic\u00a0<code>num.partitions<\/code>\u00a0is defined under\u00a0<code>\/etc\/kafka\/server.properties<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The total number of open files could be very huge if the broker hosts many partitions and a particular partition has many log segment files.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can see the current file descriptor limit by running<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">ulimit -n\u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To solve the issue you either need to change the limit of open file descriptors:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">ulimit -n &lt;noOfFiles&gt;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">or somehow reduce the number of open files (for example, reduce number of partitions per topic).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Please follow the below steps when you get the above error. I got this error in KAFKA and everytime its [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1020],"tags":[900,901],"class_list":["post-6490","post","type-post","status-publish","format-standard","hentry","category-containers-kubernetes","tag-kafka","tag-too-many-open-files","psol-cat-containers-kubernetes"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-1GG","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/6490","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=6490"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/6490\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=6490"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=6490"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=6490"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}