An App Engine application can consume resources up to certain quotas. With these quotas, App Engine ensures that your application won't exceed your budget, and that other applications running on App Engine won't impact your application's performance.
Contents
- Billable limits and safety limits
- How resources are replenished
- When a resource is depleted
- Resources
Billable limits and safety limits
App Engine has three kinds of quotas or limits:
- Free Quotas: Free quotas are limits set on free applications. These quotas can only be exceeded by paid applications, up to the limits of the application's budget or the safety limit, whichever applies first.
- Billable Limits: Billable limits apply to paid apps and cannot be exceeded. Billable limits are set by the application administrator in the Billing section of the Administration Console. These quotas allow administrators to manage application cost.
- Safety Limits: Safety limits are set by Google to protect the integrity of the App Engine system. These quotas ensure that no single app can over-consume resources to the detriment of other apps. If you go above these limits you'll get an error whether you are paid or free.
Billable limits
Every application gets an amount of each resource for free, but application administrators can increase these quotas by enabling paid apps and setting a daily budget. You will be charged for the resources your application actually uses, and for the amount of resources used above the free quota thresholds.
After you enable billing for your application, you can set your daily budget and adjust quotas using the Administration Console. For more information about setting your budget and allocating resources, see Pricing . When you enable billing for your application, the application's safety limits increase. See the Resources section for details.
Note: Premier accounts do not use daily budgets, relying instead on monthly billing and pay-per-use.
Safety limits
Safety limits include daily quotas and per-minute quotas :
- Daily quotas are refreshed daily at midnight Pacific time. Paid applications can exceed this free quota until their budget is exhausted.
- Per-minute quotas protect the application from consuming all of its resources in very short periods of time, and prevent other applications from monopolizing a given resource. If your application consumes a resource too quickly and depletes one of the per-minute quotas, the word "Limited" appears next to the appropriate quota on the Quota Details screen in the Admin Console. Requests for resources that have hit their per-minute maximum will be denied.
See When a Resource is Depleted for details about what happens when a quota is exceeded and how to handle quota overage conditions.
Tip:
For paid apps, the maximum per-minute quotas accommodate high traffic levels, enough to handle a spike in traffic from your site getting mentioned in news stories. If you believe a particular quota does not meet this requirement, please
create a feature request issue in the issue tracker
.
Please note that filing a feature request will not assure an actual quota bump for a particular app, but it will help us understand which quota is potentially too low for general use cases.
If you're expecting extremely high traffic levels, or for some reason your app requires particularly high quotas (e.g. because of significant product launch or large load tests),
consider signing up for support using the Cloud Console or
a premier account
.
How resources are replenished
App Engine tracks your application's resource usage against system quotas. For both free and paid applications, App Engine resets all resource measurements at the beginning of each calendar day (except for Stored Data, which always represents the amount of datastore storage in use). When free applications reach their quota for a resource, they cannot use that resource until the quota is replenished. Paid apps can exceed the free quota until their budget is exhausted.
Daily quotas are replenished daily at midnight Pacific time. Per-minute quotas are refreshed every 60 seconds.
When a resource is depleted
When an application consumes all of an allocated resource, the resource becomes unavailable until the quota is replenished. This may mean that your application will not work until the quota is replenished.
For resources that are required to initiate a request, when the resource is depleted, App Engine by default returns an HTTP 403 or 503 error code for the request instead of calling a request handler. The following resources have this behavior:
- Bandwidth, incoming and outgoing
- Instance hours
Tip: You can configure your application to serve a custom error page when your application exceeds a quota. For details, see Custom Error Responses documentation for Python , Java , and Go .
For all other resources, when the resource is depleted, an attempt in the application to consume the resource results in an exception. This exception can be caught by the application and handled, such as by displaying a friendly error message to the user. In the Python API, this exception is
apiproxy_errors.OverQuotaError
. In the Java API, this exception is
com.google.apphosting.api.ApiProxy.OverQuotaException
. In the Go API, the
appengine.IsOverQuota
function reports whether an error represents an API call failure due to insufficient available quota.
The following example illustrates how to catch the
OverQuotaError
, which may be raised by the
SendMessage()
method if an email-related quota has been exceeded:
try: mail.SendMessage(to='[email protected]', from='[email protected]', subject='Test Email', body='Testing') except apiproxy_errors.OverQuotaError, message: # Log the error. logging.error(message) # Display an informative message to the user. self.response.out.write('The email could not be sent. ' 'Please try again later.')
If you're exceeding your system resource quota unexpectedly, consider profiling your application's performance .
Is your app exceeding the default limits? If you are a Premier customer, you can request additional quota by contacting support . If you are not a Premier customer, you can apply for more Mail API quota or file a feature request for any other quota increase. Or you can find out more about our Premier accounts .
Resources
An application may use the following resources, subject to quotas. Resources measured against billable limits are indicated with "(billable)." Resource amounts represent an allocation over a 24 hour period.
The cost of additional resources is listed on the Pricing page.
Default GCS Bucket
Each app can have a default Google Cloud Storage (GCS) bucket that is ready to use with no further activations, configurations, or permission settings required. For more information see the documentation for default buckets in your language ( Java | Python | PHP ). The following quotas apply specifically to use of the default GCS bucket.
- GCS default bucket Stored Data
- The total amount of data stored in the default GCS bucket. Available for both paid and free apps.
Resource | Free Default Limit | Billing Enabled Default Limit |
---|---|---|
Default GCS Bucket Stored Data | 5 GB | First 5 GB free; no maximum |
Blobstore
The following quotas apply specifically to use of the blobstore.
- Blobstore Stored Data
- The total amount of data stored in the blobstore. Available for both paid and free apps.
Resource | Free Default Limit | Billing Enabled Default Limit |
---|---|---|
Blobstore Stored Data | 5 GB | First 5 GB free; no maximum |
Channel
- Channel API Calls
- The total number of times the application accessed the Channel service.
- Channels Created
- The number of channels created by the application.
- Channel Hours Requested
- The number of hours of channel connect time requested by the application.
- Channel Data Sent
- The amount of data sent over the Channel service. This also counts toward the Outgoing Bandwidth quota.
Resource | Free Default Limit | Billing Enabled Default Limit | ||
---|---|---|---|---|
Daily Limit | Maximum Rate | Daily Limit | Maximum Rate | |
Channel API Calls | 657,000 calls | 3,000 calls/minute | 91,995,495 calls | 32,000 calls/minute |
Channels Created |