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
OutOfMemoryError #1004
Comments
Can you provide us a little more details? What is the maximum configure HEAP size of that node? |
One thing to mention: We're trying to prevent Out Of Memory exceptions in any case, but this is a hard run (fighting with the JVM GC ;). This is an ongoing task, so your information would be very helpful. |
The HEAP size is the default (256m) because I couldn't quickly figure out the best way to set it for the upstart environment (any advice on this would be appreciated). Crate 0.40.2 java version "1.7.0_55" Ubuntu Linux 3.13.0-29-generic (latest Amazon AMI) 5 shards (default) but on a cluster of 3 nodes. Example of one document:
I recently encountered an OutOfMemory exception when writing a tool to migrate this data from Cassandra and what I learned is that it can happen when you load all the items into memory (of course) rather than providing a view, or streaming them. I know it's difficult to pin down the cause of the issue and can provide Crate with the exact data file if needed. Regardless of the HEAP size set, it should be able to manage its resources without crashing. For now I will try and increase the HEAP size as I was meaning to do this anyway and see if it works, or break the file into smaller pieces. |
Also the schema:
|
I just tried splitting the file into smaller files of 100,000 lines each and it still failed:
I will try and increase the heap now. |
Yes you're totally right, it should never crash regardless of the given resources. But as I mention this is not so easy to achieve... we'll definitely work on this, pls be patient and increase your heap meanwhile. 256M is a small value, I recommend to increase it to at least 2G by either starting crate with -Xmx2g or setting an env var: _JAVA_OPTIONS=-Xmx2g |
I've increase the heap to 2048m and it still fails with files split to 1mil records. I wonder if it is because it trying to overwrite existing entries this time? From the crate upstart log (no visible warning in the crate log).
|
Can you please increase the HEAP to find out how much HEAP is needed for your import?
and afterwards:
to re-enabled both with default values. |
I really don't think increasing the HEAP will fix the issue as it will continue to grow. I will try disabling refreshing and replicas first and then if that doesn't work I'll upgrade the ec2 instance to a higher memory (perhaps 60GB) and try again. |
It still falls over, trying a larger instance type now. |
Maybe it makes sense we will continue talking via IRC #crate at freenode? ;) |
Ok I had some luck with 48.8GB of HEAP: It cycled up to ~36GB of used HEAP and then back down again during the import, settling at 24.4GB afterwards. Here is the log output which includes an exception of some sort:
|
While importing using copy from for a 8 million record file after about 1.2 million records.
The text was updated successfully, but these errors were encountered: