question

robert avatar image
robert asked

CloudScriptExecutionTimeLimitExceeded / Inventory

We have some players playing one of our games for almost a year now. Recently these players started experiencing troubles. After a little investigation it looks like we get a CloudScriptExecutionTimeLimitExceeded for one of our cloud script API methods. The method in question does not do very much, but at the end of the method we query the UserInventory. All users affected by this timeout have only a few active user inventory items (between 20 and 30) but more than 6000 expired items (this were time limited offers, time limited items, rewards, etc...).

So our question is, should revoked/expired items really increase the GetUserInventory time? And if so, how to work around this or clear the history of expired items?

TitleID: 4D83
PlayerID: 9139B32C3D42936E
Method: StartEvent
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Revoked/expired/consumed items will only affect the query time for player inventory for a short period after the items have been revoked/expired/consumed. Basically, they're queued for cleanup, then they're cleaned up. Is it possible your players are making a bunch of inventory calls in rapid succession (opening a bunch of crates they have stored, or something)? That's the most common way we see what you describe. Having an animation for the operation, so that there's a natural delay between calls, is usually the best approach to fix this.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

robert avatar image robert commented ·

Hmm, unfortunately thats not really that case, at least not intended. For this specific user we see for example 6405 revoked/expired/consumed items in the dashboard. Are cleanup items included in this amount displayed?

E.g. 100 items granted, 80 consumed, 60 cleaned up, the amount of revoked/expired/consumed items should than be 20, correct?

The user in question gets/consumes around 5 items per day. Most of the inventory grant/consume operations performed are for free coins every 30 minutes where he gets the item granted which then is consumed or expires.

0 Likes 0 ·
brendan avatar image brendan robert commented ·

Yes, previously cleaned up items are still listed in the Game Manager - hence, the higher number.

If you have some specific repro scenarios we can look at, that might help us to narrow down the cause on what you're seeing.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.