-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.OutOfMemoryError: Java heap space #99
Comments
Cleanup batchpoints object after flushing to storage or create new one on every iteration |
Thanks. How can I cleanup the batchpoints object? I fear that the garbage collector could get in trouble, if a create a new one every iteration, cause there is no destructor in java. |
You could enable batch and write single points directly, but the way batch processor works now may cause problems - e.g. data loss. |
@benidroe why don't you simply get the points' list and clean it after each time you write? try{
Point p;
while (true){
// Take the next 50 Points to write
for(int i = 0; i < 50; i++){
p = (Point) Collector.writeQueue.take();
batchPoints.point(p);
}
try{
influxDB.write(batchPoints);
} catch (RuntimeException r){
System.out.println("Timeout: Writing to InfluxDB. Nothing written this time!");
} finally {
batchPoints.getPoints().clear();
}
}
} catch (InterruptedException e){
System.out.println("Can´t take element from queue " + e);
} |
Yes @benidroe please let us know or close it by yourself. |
Project finished since the end of last year, not verry successfully.... |
I use following code to write data from a BlockingQueue to InfluxDB:
After hours of running there is this exception:
The root of this Issue seems to be this line:
What is going wrong? Can you please help me?
The text was updated successfully, but these errors were encountered: