Skip to content

Conversation

@dgonzalez-splashthat
Copy link

@dgonzalez-splashthat dgonzalez-splashthat commented May 20, 2025

DO NOT MERGE

This PR has been created just to review the differences between branches.
This branch is referenced by the iOS HostApp in the Podfile.

What are you trying to accomplish?

Additional Description

Customers are complaining about seeing an empty events list after a BE forced logout.

This is a random problem that doesn't happen frequently. We cannot reproduce it, but we are sure it's a database issue caused by not properly disposed open connections after a logout.

In order to analyze this, we have to add some logic to the YapDatabase library that keeps track of connections state, and send a report to Datadog when they aren't properly closed, telling where in the code that connection is in use.

We have to:

  • Modify the database library to allow to receive a tag when the app opens a connection
  • Modify the database library to keep a profile of open connections
  • Modify the database library to expose the previous info to the app
  • Modify the app to send a tag when it opens a connection
  • Modify the app to query open connections after a logout
  • Modify the app to send that info to Datadog each time we find open connections

Slack conversation: https://cvent.slack.com/archives/C0844C6DV0C/p1747255741587129

#define DEFAULT_MAX_CONNECTION_POOL_COUNT 5 // connections
#define DEFAULT_CONNECTION_POOL_LIFETIME 90.0 // seconds

static BOOL logToConsole = NO;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a few things changed here. XCode has automatically indented this file.

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

Successfully merging this pull request may close these issues.

2 participants