You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Isha Gupta <gu...@gmail.com> on 2021/07/09 08:51:15 UTC
OutOfMemory error while running kafka server
Hi all,
I am facing a OutofMemory issue while running the kafka server.
My zookeeper is running fine but getting below error while running kafka
server:
at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:74)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.OutOfMemoryError: Map failed
at sun.nio.ch.FileChannelImpl.map0(Native Method)
... 33 more
I am working on Windows10 OS. After googling,I have changed the
server.start.sh file as:
if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
export KAFKA_HEAP_OPTS="-Xmx512M -Xms512M"
fi
But it still not working. My java is 64bit only and everything else is also
according to requirement.
Please help me in resolving this issue.
Thanks,
Isha
Re: OutOfMemory error while running kafka server
Posted by Isha Gupta <gu...@gmail.com>.
It got resolved finally :)
Issue was with java version. I installed jdk 8 again and it worked.
Regards,
Isha
On Fri, 9 Jul 2021 at 15:44, saurav suman <sa...@gmail.com> wrote:
> Normally Kafka should start without any load with default heap size. You
> need to stop all your consumers and producers.
> Try increasing heap further. If still issue persists enable debug log and
> check.
>
>
> Regards
> Saurav Suman
>
> On Fri, Jul 9, 2021, 5:15 PM Isha Gupta <gu...@gmail.com> wrote:
>
> > Hi Saurav,
> >
> > I changed it to 2G and ran again but error persists.
> >
> > Isha
> >
> > On Fri, Jul 9, 2021 at 10:26 AM saurav suman <sa...@gmail.com>
> > wrote:
> >
> > > Hi,
> > >
> > > I am not sure how much load your kafka is having.
> > > How much memory you have on the server?
> > > Try increasing the heap to 2G and see.
> > >
> > >
> > > Regards
> > > Saurav Suman
> > >
> > >
> > > On Fri, Jul 9, 2021, 2:21 PM Isha Gupta <gu...@gmail.com> wrote:
> > >
> > > > Hi all,
> > > >
> > > > I am facing a OutofMemory issue while running the kafka server.
> > > > My zookeeper is running fine but getting below error while running
> > kafka
> > > > server:
> > > >
> > > > at
> kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:74)
> > > > at java.lang.Thread.run(Unknown Source)
> > > > Caused by: java.lang.OutOfMemoryError: Map failed
> > > > at sun.nio.ch.FileChannelImpl.map0(Native Method)
> > > > ... 33 more
> > > >
> > > > I am working on Windows10 OS. After googling,I have changed the
> > > > server.start.sh file as:
> > > >
> > > > if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
> > > > export KAFKA_HEAP_OPTS="-Xmx512M -Xms512M"
> > > > fi
> > > >
> > > > But it still not working. My java is 64bit only and everything else
> is
> > > also
> > > > according to requirement.
> > > >
> > > > Please help me in resolving this issue.
> > > >
> > > > Thanks,
> > > > Isha
> > > >
> > >
> >
>
Re: OutOfMemory error while running kafka server
Posted by saurav suman <sa...@gmail.com>.
Normally Kafka should start without any load with default heap size. You
need to stop all your consumers and producers.
Try increasing heap further. If still issue persists enable debug log and
check.
Regards
Saurav Suman
On Fri, Jul 9, 2021, 5:15 PM Isha Gupta <gu...@gmail.com> wrote:
> Hi Saurav,
>
> I changed it to 2G and ran again but error persists.
>
> Isha
>
> On Fri, Jul 9, 2021 at 10:26 AM saurav suman <sa...@gmail.com>
> wrote:
>
> > Hi,
> >
> > I am not sure how much load your kafka is having.
> > How much memory you have on the server?
> > Try increasing the heap to 2G and see.
> >
> >
> > Regards
> > Saurav Suman
> >
> >
> > On Fri, Jul 9, 2021, 2:21 PM Isha Gupta <gu...@gmail.com> wrote:
> >
> > > Hi all,
> > >
> > > I am facing a OutofMemory issue while running the kafka server.
> > > My zookeeper is running fine but getting below error while running
> kafka
> > > server:
> > >
> > > at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:74)
> > > at java.lang.Thread.run(Unknown Source)
> > > Caused by: java.lang.OutOfMemoryError: Map failed
> > > at sun.nio.ch.FileChannelImpl.map0(Native Method)
> > > ... 33 more
> > >
> > > I am working on Windows10 OS. After googling,I have changed the
> > > server.start.sh file as:
> > >
> > > if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
> > > export KAFKA_HEAP_OPTS="-Xmx512M -Xms512M"
> > > fi
> > >
> > > But it still not working. My java is 64bit only and everything else is
> > also
> > > according to requirement.
> > >
> > > Please help me in resolving this issue.
> > >
> > > Thanks,
> > > Isha
> > >
> >
>
Re: OutOfMemory error while running kafka server
Posted by Isha Gupta <gu...@gmail.com>.
Hi Saurav,
I changed it to 2G and ran again but error persists.
Isha
On Fri, Jul 9, 2021 at 10:26 AM saurav suman <sa...@gmail.com>
wrote:
> Hi,
>
> I am not sure how much load your kafka is having.
> How much memory you have on the server?
> Try increasing the heap to 2G and see.
>
>
> Regards
> Saurav Suman
>
>
> On Fri, Jul 9, 2021, 2:21 PM Isha Gupta <gu...@gmail.com> wrote:
>
> > Hi all,
> >
> > I am facing a OutofMemory issue while running the kafka server.
> > My zookeeper is running fine but getting below error while running kafka
> > server:
> >
> > at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:74)
> > at java.lang.Thread.run(Unknown Source)
> > Caused by: java.lang.OutOfMemoryError: Map failed
> > at sun.nio.ch.FileChannelImpl.map0(Native Method)
> > ... 33 more
> >
> > I am working on Windows10 OS. After googling,I have changed the
> > server.start.sh file as:
> >
> > if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
> > export KAFKA_HEAP_OPTS="-Xmx512M -Xms512M"
> > fi
> >
> > But it still not working. My java is 64bit only and everything else is
> also
> > according to requirement.
> >
> > Please help me in resolving this issue.
> >
> > Thanks,
> > Isha
> >
>
Re: OutOfMemory error while running kafka server
Posted by saurav suman <sa...@gmail.com>.
Hi,
I am not sure how much load your kafka is having.
How much memory you have on the server?
Try increasing the heap to 2G and see.
Regards
Saurav Suman
On Fri, Jul 9, 2021, 2:21 PM Isha Gupta <gu...@gmail.com> wrote:
> Hi all,
>
> I am facing a OutofMemory issue while running the kafka server.
> My zookeeper is running fine but getting below error while running kafka
> server:
>
> at kafka.server.KafkaRequestHandler.run(KafkaRequestHandler.scala:74)
> at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.OutOfMemoryError: Map failed
> at sun.nio.ch.FileChannelImpl.map0(Native Method)
> ... 33 more
>
> I am working on Windows10 OS. After googling,I have changed the
> server.start.sh file as:
>
> if [ "x$KAFKA_HEAP_OPTS" = "x" ]; then
> export KAFKA_HEAP_OPTS="-Xmx512M -Xms512M"
> fi
>
> But it still not working. My java is 64bit only and everything else is also
> according to requirement.
>
> Please help me in resolving this issue.
>
> Thanks,
> Isha
>