Search This Blog

Tuesday, March 15, 2011

Resource Usage Restrictions on Sandboxed Solutions

Sandboxed solutions are also subject to three kinds of resource usage restrictions that can be categorized by (1) the sort of entity to which the restriction applies and (2) the sort of entity on which the penalty for exceeding the restriction is imposed.
  • Per Request with the Request Penalized: There is a hard limit to how long a sandboxed solution can take to complete. This is 30 seconds by default. If a sandboxed solution exceeds the limit, the request (but not the sandboxed worker process) is terminated. (This limit is configurable, but only through custom code against the object model. The relevant parts of the object model are not available to sandboxed solutions, so no sandboxed solution can change the limit.)
  • Per Request with the Process Penalized: There is a set of 15 resource additional resource limits that apply to requests. If a request exceeds one of them, the process (and all the sandboxed solutions running in it) is terminated.
  • Per Day/Per Site Collection with the Site Collection Penalized: Each site collection is subject to a configurable maximum of daily "resource points". These points accumulate based on an algorithm that takes into account the use of resources in the 15 resource categories by the sandboxed solutions installed in the site collection. When a site collection exceeds its maximum allowed points, all sandboxed solutions in the site collection are terminated and no more can run for the remainder of the day.
Figure 1 shows how an HTTP request is handled when it accesses a sandboxed solution.
Figure 1: Request processing model for sandboxed solutions


Figure 2 shows how a request that accesses a sandboxed solution is processed when the sandboxed solution makes a call to a full trust proxy.
Figure 2: Request processing model when a sandboxed solution calls a full-trust proxy




more info:Click on this link:

No comments:

Post a Comment