Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • General Discussion /
avatar image
Question by visualizervr · May 04, 2018 at 08:40 PM · CloudScriptlimits

CloudScript execution time includes server warmup

I find that it is an extremely common occurrence that my CloudScript functions will exceed the time limit when they haven't run in some time. That is clearly because the first time they are run, they are loaded onto the server which takes some time. Subsequent calls run faster because of this.

Since CloudScript functions only allow a very small amount time before they timeout (5 - 10 seconds), I find it a little unfair that the time it takes to load them onto the server is counted towards the timeout limit. It makes it such that I need to rely on retry logic everywhere that a cloud function is called on my front-end.

Does anyone else have this issue and is there some general advice about this?

Thanks in advance.

Comment
visualizervr

People who like this

1 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Brendan · May 05, 2018 at 01:32 AM

If your script is running at close to the time limit under normal circumstances, it's highly recommended that you trim the time required. In general with servers, you should only be targeting around 80% of the theoretical max, for safety's sake. In the case of Cloud Script, for any game with a non-trivial player base, you should find that your scripts remain loaded most of the time, but it is always the case that there could be a condition that results in the script not being loaded on a logic server (or needing another logic server, if load is growing for your title), which will cause the script to have an incremental startup time.

Comment

People who like this

0 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    1 Person is following this question.

    avatar image

    Related Questions

    Cloud script triggered action time limit exceeded in one specific time 1 Answer

    Random generate unique items 1 Answer

    CloudScript level entity api and limits 1 Answer

    CloudScript .js file size limits,Cloud Script Javascript code limit 1 Answer

    What happens when you're exceeding the CloudScript execution time limit too often? 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges