Solved

"Function execution took 6730 ms, finished with status code: 200"

  • 29 March 2024
  • 4 replies
  • 26 views

Badge +6

 

function_name: "ext-firestore-revenuecat-purchases-handler"

severity: "DEBUG"

"Function execution took 6730 ms, finished with status code: 200"

 

Logs are taken from Google Cloud Console, Revenue Cat extension 0.1.12.

I have only 1 “Sandbox” customer, why RC function execution takes such an extremely long time?!! 

 

AppStore TestFlight / Sandbox auto-extends subscription each 5 minutes, and I have similar logs in Firestore (with RC Extension); in average, time varies from 800ms to 1200ms, and sometimes almost 7 seconds?

Could you help please, is there any bugs / bottlenecks with this implementation? And how to disable “Debug”? Right now I am just testing, but I expect about 10,000 concurrent users and it can become really bad… thanks

icon

Best answer by wes_clark 2 April 2024, 21:36

View original

This post has been closed for comments

4 replies

Userlevel 3
Badge +5

Hi! I took a look at your sandbox user from my end and it appears that this user has a large amount of purchases on its receipt. This factor, combined with the general delayed performance in the Sandbox environment, could be the reason why it is taking so long. Can you create a fresh sandbox test user and let me know if you are still seeing delays with that one?

Badge +6

Thank you @wes_clark 

yes I noticed from logs enormous amount of JSON “last purchases”, very slow, but I can test it using TestFlight only on real device so that I cannot use different sandbox account… only if I connect device to computer by cable. Yes I’ve read somewhere it is “apple” issue… thank you for response, I’ll try now with fresh user & device connected to computer. But interestingly, it doesn’t create new sandbox user in RevenueCat UI: I do not see there new sandbox users, although I use new account for payments (such as abc+5@xyz.com, abc+6@xyz.com, etc.)

Anyway, too many purchases (subscriptions) could explain this, I probably have already few hundred renewals during tests.

Badge +6

Hi @wes_clark 

Yes I can confirm with cable connection to laptop, “local” iPhone tests are 100x faster than with TestFlight; I created new sandbox account. I cannot see in Google Firebase RC ext. function stats yet.

With old exhausted account & TestFlight, loading products from Apple was taking 5-10 seconds (but loading offerings from RC was instant); with new “sandbox” & local test, both are fast.

Why I can see only single sandbox account at RevenueCat? Maybe because it uses “device token” and merged all together (since device is the same)? At AppConnect, I created fresh sandbox account, “abcd+11@xyz.com”, and configured iPhone to use it.

Anyway, I am sure in production users won’t have such issues, I am too picky ;) still testing.

 

Badge +6

I am wondering if it is normal to see this kind of numbers for Google Firebase - Revenue cat Extension,

 

{
insertId: "lnb4zcf5nsnih"
labels: {2}
logName: "projects/********/logs/cloudfunctions.googleapis.com%2Fcloud-functions"
receiveTimestamp: "2024-04-02T20:30:13.790609324Z"
resource: {2}
severity: "DEBUG"
textPayload: "Function execution took 467 ms, finished with status code: 200"
timestamp: "2024-04-02T20:30:13.119895279Z"
trace: "projects/******/traces/3fad732e32cab51278393508d199033c"
}

 

Maybe I should disable “DEBUG”?

Just wondering… because I expected just a few milliseconds instead of few hundreds. 

Also, Firebase is in Canada, Montreal, but closest RevenueCat is in North Virginia.