HTTP2 memory leak on iOS 10.2 with AFNetworking 3.1.0
Asked Answered
N

0

6

I have an upload service, which I recently transitioned to HTTP2. The service is built with NodeJS and nginx is the proxy to the application server.

Shortly after the switch to HTTP2, we noticed crashes in the iOS application that uses the upload service. We found the following results:

memory leak

With HTTP2 enabled, the app ran out of memory when uploading large files (1GB+).

For the above picture, we uploaded the same video 3 times - the first two times, http2 was enabled. For the third upload, the only changes we made to the setup were that http2 was disabled, and the webserver was restarted to reflect that.

This seems like a bug (memory leak) in either iOS, or AFNetworking, but we haven't been able to pin it down yet. Has anyone observed anything like this? Is there a workaround?

Versions:

  • nginx version: nginx/1.10.0 (Ubuntu)
  • Ubuntu 16.04.1
  • iOS 10.2
  • AFNetworking 3.1.0

Edit

Seems like, indeed, AFNetworking is the culprit:

enter image description here

enter image description here

Necrotomy answered 3/2, 2017 at 9:36 Comment(3)
Did you tried to use Profiler Instrument to find memory leak issue ?Exophthalmos
Well, we did - the problem is localized in the uploads service, but we haven't been able to dig down. The point is that we have no code changes - the only thing that's changed is the server configuration.Necrotomy
Opened an issue with AFNetworking - github.com/AFNetworking/AFNetworking/issues/3864Necrotomy

© 2022 - 2024 — McMap. All rights reserved.