Skip to content
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

App freezes after a while when number of topics are more #10

Closed
Akhilesh002 opened this issue Feb 8, 2021 · 8 comments
Closed

App freezes after a while when number of topics are more #10

Akhilesh002 opened this issue Feb 8, 2021 · 8 comments

Comments

@Akhilesh002
Copy link

app freeze when the number of subscriptions are more. Pasted last trail logs here

I/flutter ( 3602): 2021-02-08 19:21:33.752252 -- MqttServerConnection::_onData - message available event fired I/flutter ( 3602): 2021-02-08 19:21:33.752355 -- MqttServerConnection::_onData - Message Received Ended <<< I/flutter ( 3602): 2021-02-08 19:21:33.753225 -- MqttConnectionHandlerBase::messageAvailable - message type is MqttMessageType.publish I/flutter ( 3602): 2021-02-08 19:21:33.754938 -- MqttPublishingManager::handlePublish - entered I/flutter ( 3602): 2021-02-08 19:21:33.759217 -- MqttConnectionHandlerBase::sendMessage - sending message started >>> -> MQTTMessage of type MqttMessageType.publishReceived I/flutter ( 3602): MessageType = MqttMessageType.publishReceived Duplicate = false Retain = false Qos = atMostOnce Size = 0 I/flutter ( 3602): Message Identifier = 1 I/flutter ( 3602): Reason Code = success I/flutter ( 3602): Properties = No properties set I/flutter ( 3602): I/flutter ( 3602): 2021-02-08 19:21:33.760230 -- MqttConnectionHandlerBase::sendMessage - sending message ended >>> I/flutter ( 3602): 2021-02-08 19:21:33.764121 -- MqttServerConnection::_onData - Message Received Started <<< I/flutter ( 3602): 2021-02-08 19:21:33.764245 -- MqttServerConnection::_ondata - adding incoming data, data length is 1168, message stream length is 0, message stream position is 0

@shamblett
Copy link
Owner

Not sure what you mean by 'number of topics are more'. More than what, a specific number?

When you say freeze do you mean the log stops exactly where it ends above and you get nothing else?

Please turn ping requests on if you haven't already done so.

@Akhilesh002
Copy link
Author

The number of topics to which this client is subscribed exceeds 3000.
The log stops exactly where it ends above and I get nothing else. The Application UI also freezes (unresponsive) at that point.
Ping requests are enabled. I didn't get logs of that too.

@shamblett
Copy link
Owner

OK so if this is happeniing 'The Application UI also freezes (unresponsive) at that point.' how do you know the package is causing this? It could just be general resource exhaustion, what platform are you running it on?

@Akhilesh002
Copy link
Author

The Application works fine when this package is removed.
I'm running it on Android.

@shamblett
Copy link
Owner

If you remove the package(assuming by this you mean the client) how are you processing 3000+ subscriptions? Are you saying some other client is OK with this but this package isn't? Does whatever else you are doing run under flutter? There's still nothing to say this is the fault of this package, you may have to profile your device.

@Akhilesh002
Copy link
Author

I have an android app, which is running perfectly fine for 4000+ subscriptions.
I'm currently porting application to flutter.
The following steps confirmed the issue.

  1. The issue was there when number of subscriptions were 3000+
  2. I reduced number of subscriptions for the same user to 1000+ and issues were not there
    I have repeated the above steps for some other users by giving access to some dummy topics. The issue was there.

@shamblett
Copy link
Owner

OK thanks I can see what you are doing a little better, but my question above still stands, without attaching observatory to the app how do you know its the fault of the package, it could be the flutter runtime is causing this, especially with the GUI freezing which the package can't affect at all. It looks like some resource starvation in the runtime, without knowing there's not much to do.

One question, does it do the same with logging off(or on), does it always bail at the same number of subscriptions.

Note I don't use flutter, I use the Dart VM so I don't have any experience with it.

@shamblett
Copy link
Owner

No further updates, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants