Closed yoshka88 closed 5 years ago
@yoshka88 Thanks for reporting the issue and sharing all the details. I will investigate the issue and post an update when I have something.
Hello, @desokroshan!
Thank you for your attention to the issue.
I've found out that when I use locally built .jar
, .aar
files from the sources from the master
branch, everything seems to be okay.
Basically, I've changed build.gradle
from this
implementation 'com.amazonaws:aws-android-sdk-core:2.10.+'
implementation 'com.amazonaws:aws-android-sdk-iot:2.6.+'
to the following
implementation "org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.1.0"
implementation "org.conscrypt:conscrypt-android:2.0.0"
implementation files('aws-android-sdk-core.jar')
implementation files('aws-android-sdk-iot.aar')
and there is no Too many open files
anymore.
Really glad, that the error disappears. However, I'm curious what is the reason for such behavior?
I've built the libraries using gradle from Android Studio with the following env variable: ANDROID_PLATFORM=27
.
Could it affect anything?
Would be great, if you can share any suggestion on this matter.
Describe the bug
When AWSIotMqttManager tries to reconnect, after ~100-300 attempts to reconnect the app crashes with this error:
Could not create epoll instance: Too many open files
To Reproduce Steps to reproduce the behavior:
I use this settings:
Which AWS service(s) are affected?
AWS IoT
Expected behavior
AWSIotMqttManager should continue to reconnect without errors
Environment Information (please complete the following information):
AWS Android SDK Version:
'com.amazonaws:aws-android-sdk-core:2.10.+'
'com.amazonaws:aws-android-sdk-iot:2.6.+'
Device: Huawei Watch 2
Android Version: 8.0
Specific to simulators: no
Additional context
The wearOS devices are used in the environment with a specific network setup which causes a huge number of reconnect attempts. So, from time to time the app crashes. I'm wondering how to fix or avoid such crashes?