Out of Memory exception
See original GitHub issueHi, first, thank you for your time and this great app.
Second, I have this problem:
2017-03-14 07:20:42 ERROR OffsetGetterWeb$:103 - Failed to run scheduled task
java.sql.SQLException: [SQLITE_CANTOPEN] Unable to open the database file (out of memory)
at org.sqlite.DB.newSQLException(DB.java:383)
at org.sqlite.DB.newSQLException(DB.java:387)
at org.sqlite.DB.throwex(DB.java:374)
at org.sqlite.NativeDB._open(Native Method)
at org.sqlite.DB.open(DB.java:86)
at org.sqlite.Conn.open(Conn.java:140)
at org.sqlite.Conn.<init>(Conn.java:57)
at org.sqlite.JDBC.createConnection(JDBC.java:77)
at org.sqlite.JDBC.connect(JDBC.java:64)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at scala.slick.jdbc.JdbcBackend$DatabaseFactoryDef$$anon$4.createConnection(JdbcBackend.scala:70)
at scala.slick.jdbc.JdbcBackend$BaseSession.conn$lzycompute(JdbcBackend.scala:397)
at scala.slick.jdbc.JdbcBackend$BaseSession.conn(JdbcBackend.scala:397)
at scala.slick.jdbc.JdbcBackend$BaseSession.withTransaction(JdbcBackend.scala:420)
at scala.slick.backend.DatabaseComponent$DatabaseDef$$anonfun$withTransaction$1.apply(DatabaseComponent.scala:54)
at scala.slick.backend.DatabaseComponent$DatabaseDef$$anonfun$withTransaction$1.apply(DatabaseComponent.scala:54)
at scala.slick.backend.DatabaseComponent$DatabaseDef$class.withSession(DatabaseComponent.scala:34)
at scala.slick.jdbc.JdbcBackend$DatabaseFactoryDef$$anon$4.withSession(JdbcBackend.scala:61)
at scala.slick.backend.DatabaseComponent$DatabaseDef$class.withTransaction(DatabaseComponent.scala:54)
at scala.slick.jdbc.JdbcBackend$DatabaseFactoryDef$$anon$4.withTransaction(JdbcBackend.scala:61)
at com.quantifind.kafka.offsetapp.OffsetDB.insertAll(OffsetDB.scala:66)
at com.quantifind.kafka.offsetapp.sqlite.SQLiteOffsetInfoReporter.report(SqliteOffsetInfoReporter.scala:9)
at com.quantifind.kafka.offsetapp.OffsetGetterWeb$$anonfun$reportOffsets$1$$anonfun$apply$6$$anonfun$apply$1.apply(OffsetGetterWeb.scala:73)
at com.quantifind.kafka.offsetapp.OffsetGetterWeb$$anonfun$reportOffsets$1$$anonfun$apply$6$$anonfun$apply$1.apply(OffsetGetterWeb.scala:73)
at scala.util.Try$.apply(Try.scala:192)
at com.quantifind.kafka.offsetapp.OffsetGetterWeb$.retryTask(OffsetGetterWeb.scala:58)
at com.quantifind.kafka.offsetapp.OffsetGetterWeb$$anonfun$reportOffsets$1$$anonfun$apply$6.apply(OffsetGetterWeb.scala:73)
at com.quantifind.kafka.offsetapp.OffsetGetterWeb$$anonfun$reportOffsets$1$$anonfun$apply$6.apply(OffsetGetterWeb.scala:73)
at scala.collection.mutable.HashSet.foreach(HashSet.scala:78)
at com.quantifind.kafka.offsetapp.OffsetGetterWeb$$anonfun$reportOffsets$1.apply(OffsetGetterWeb.scala:73)
at com.quantifind.kafka.offsetapp.OffsetGetterWeb$$anonfun$reportOffsets$1.apply(OffsetGetterWeb.scala:70)
at scala.collection.Iterator$class.foreach(Iterator.scala:893)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at com.quantifind.kafka.offsetapp.OffsetGetterWeb$.reportOffsets(OffsetGetterWeb.scala:69)
at com.quantifind.kafka.offsetapp.OffsetGetterWeb$$anonfun$schedule$1.apply$mcV$sp(OffsetGetterWeb.scala:79)
at com.quantifind.kafka.offsetapp.OffsetGetterWeb$$anon$2.run(OffsetGetterWeb.scala:48)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
I using retain 2 days and Zookeeper as storage. My version is 0.4.1
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top Results From Across the Web
3.2 Understand the OutOfMemoryError Exception
One common indication of a memory leak is the java.lang.OutOfMemoryError exception. Usually, this error is thrown when there is insufficient space to ...
Read more >Understanding OutOfMemoryError Exception in Java
Usually, this error is thrown when the Java Virtual Machine cannot allocate an object because it is out of memory. No more memory...
Read more >How to Handle the OutOfMemoryError in Java - Rollbar
A java.lang.OutOfMemoryError is a runtime error in Java which occurs when the Java Virtual Machine (JVM) is unable to allocate an object due ......
Read more >Java OutOfMemoryError Exceptions: Causes & Fixes [Tutorial]
Java Heap space is one of the most common errors when it comes to memory handling in the Java Virtual Machine world. This...
Read more >C# : Out of Memory exception - Stack Overflow
Any memory allocation in .NET that is over 85,000 bytes comes from the large object heap (LOH) not the normal small object heap....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @Rohlik I recommend you run this as a user other than root, as you may also run into issues with the DB trying to run its native code from the /tmp directory as root, which most linux distributions do not allow be default.
As you can see I have some memory available, also swap is almost empty.
How much memory I need for running offset monitoring tool without problem?