title: What happens if I loop indefinitely in a stored procedure?
body: <p>After 5s Azure Cosmos DB isn't allowing you to perform any database operations within a stored procedure anymore.</p>
  
  <p>Two questions:</p>
  
  <p>a) Am I allowed to perform other operations that take longer than 5s? E.g., some postprocessing of queried data and then return to the user later on?</p>
  
  <p>b) Do I pay RUs only for the actual database operations within a stored procedure or also for some kind of "JavaScript execution time" as well?</p>