-
Notifications
You must be signed in to change notification settings - Fork 119
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 #2265
Comments
@timrijckaert Hey, for this use case I'd recommend uploading the apks to Google Cloud Storage via gsutil, and then passing Flank the GCS path to the apks. That'll ensure there's no memory problems as the apks get larger over time. The tests will also be a bit faster as the apk only has to be uploaded once. Alternatively, you could try increasing the Java heap space made available to flank. Something like: |
Thanks for the quick reply! Or pass the memory options to the Thanks in advance |
@timrijckaert I don't think Fladle supports the gsutil strategy I mentioned. Try to increase the heap space by setting |
Hmm same result unfortunately |
@timrijckaert I'd open an issue on https://github.com/runningcode/fladle/issues to see if they can advise. |
@timrijckaert The fladle maintainer suggested to set the maxHeapSize on the FlankExec task: |
I applied the following
I get
|
issue seems to be related to the Files.readAllBytes() call when a file need to be uploaded
maybe a new type should be introduced (ie: RemoteStorage.File instead of RemoteStorage.Data which takes the ByteArray) to delay the loading and use a buffered read/write with GcStorage (ie: using a WriterChannel) |
To add on this
This gets amplified by the amount of APK's to upload. |
@loki666 @timrijckaert If you'd like to submit a patch, I'll happily review it. |
Describe the bug
Hello,
As we have been adding screenshot tests to more and more Android modules we wanted to parallelise our CI build to first build the test APK's.
After all modules have created their APK we run
./gradlew runFlank
We have about 14 modules thus-far containing screenshot tests.
Averaging in size of approximately 60MB
The build stops with a OutOfMemory.
See full logs in
Build summary
section below.Build summary
Any idea on how to fix this?
Additional context
Thanks in advance.
The text was updated successfully, but these errors were encountered: