Google Cloud Platform
App Engine

Quotas

An App Engine application can consume resources up to certain quotas. With these quotas, App Engine ensures that your application won't exceed your spending limit, and that other applications running on App Engine won't impact your application's performance.

You can view the daily usage and quota consumption of App Engine resources for your project in the Google Cloud Platform Console Quota Details page.

Contents

  1. Billable limits and safety limits
  2. How resources are replenished
  3. When a resource is depleted
  4. Resources

Billable limits and safety limits

App Engine has three kinds of quotas or limits:

  • Free Quotas: Every application gets an amount of each resource for free. Free quotas can only be exceeded by paid applications, up to the application's spending limit or the safety limit, whichever applies first.
  • Spending Limits: Spending limits are set for paid apps and cannot be exceeded. If you are the project owner and the billing administrator, you can set the spending limit to manage application costs in the Google Cloud Platform Console in the App Engine Settings.
  • 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.

Spending limits

If you are a project owner and a billing administrator, you can enable billing for a project so that it can use additional resources beyond the free quotas. You will be charged for the resources your application uses above the free quota thresholds.

After you enable billing for your application, you may want to set a spending limit so there is a limit to the amount you can be charged per day. By default, the spending limit is unlimited. It's a good idea to specify a spending limit to gain more control over application costs.

When you enable billing for your application, the application's safety limits increase. See the Resources section for details.

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 spending limit 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 Cloud Platform 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), we recommend you sign up for Silver, Gold or Platinum support.

How resources are replenished

App Engine tracks your application's resource usage against system quotas. 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 spending limit 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='test@example.com',
                   from='admin@example.com',
                   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.')

Is your app exceeding the default limits? If you need a higher mail quota, you can use SendGrid to send email. For any other quota increase, if you have Silver, Gold, or Platinum support package, you can contact your support representative to request higher throughput limits. Otherwise, you can file a feature request.

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 Google Cloud Storage Bucket

Applications can use a default Cloud Storage bucket, which has free quota and doesn't require billing to be enabled for the app. You create this free default bucket in the Google Cloud Platform Console App Engine settings page for your project.

The following quotas apply specifically to use of the default bucket.

Google Cloud Storage default bucket Stored Data
The total amount of data stored in the default bucket. Available for both paid and free apps.
Resource Free Default Limit Billing Enabled Default Limit
Default Google Cloud Storage 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 100 channels 6 creations/minute Based on your spending limit 60 creations/minute
Channel Hours Requested 200 hours 12 hours requested/minute Based on your spending limit 180 hours requested/minute
Channel Data Sent Up to the Outgoing Bandwidth quota 22 MB/minute 1 TB 740 MB/minute

Code and static data storage

Static Data
No single static data file may be larger than 32MB.
Total Storage
The storage quota applies to the total amount of code and static data stored by all versions of your app. The total stored size of code and static files is listed in the Main Dashboard table. Individual sizes are displayed on the Versions and Backends screens respectively. Free apps may only upload up to 1 GB of code and static data. Paid apps may upload more, but will be charged $ 0.026 per GB per month for any code and static data storage that exceeds 1 GB.
Resource Cost
Code & Static Data Storage - First 1 GB Free
Code & Static Data Storage - Exceeding 1 GB $ 0.026 per GB per month

Datastore

The Stored Data (billable) quota refers to all data stored for the application in the Datastore, the Blobstore, and Task Queues. Other quotas in the "Datastore" section of the Quota Details screen in the Google Cloud Platform Console refer specifically to the Datastore service.

Stored Data (billable)

The total amount of data stored in datastore entities and corresponding indexes, Task Queues, and the Blobstore.

It's important to note that data stored in the datastore may incur significant overhead. This overhead depends on the number and types of associated properties, and includes space used by built-in and custom indexes. Each entity stored in the datastore requires the following metadata:

  • The entity key, including the kind, the ID or key name, and the keys of the entity's ancestors.
  • The name and value of each property. Since the datastore is schemaless, the name of each property must be stored with the property value for any given entity.
  • Any built-in and custom index rows that refer to this entity. Each row contains the entity kind, any number of property values depending on the index definition, and the entity key.

See How Entities and Indexes are Stored for a complete breakdown of the metadata required to store entities and indexes at the Bigtable level.

Number of Indexes
The number of Datastore indexes that exist for the application. This includes indexes that were created in the past and no longer appear in the application's configuration but have not been deleted using AppCfg's vacuum_indexes command.
Write Operations
The total number of Datastore write operations.
Read Operations
The total number of Datastore read operations.
Small Operations
The total number of Datastore small operations. Small operations include calls to allocate Datastore IDs or keys-only queries.
Resource Free Default Daily Limit Billing Enabled Default Limit
Stored Data (billable) 1 GB * 1 GB free; no maximum
Number of Indexes 200 * 200
Write Operations 50,000 Unlimited
Read Operations 50,000 Unlimited
Small Operations 50,000 Unlimited

*Not a daily limit but a total limit. Auto-generated single property ascending indexes are not counted towards this limit.

Note: Datastore operations generated by the Datastore Admin and Datastore Viewer count against your application quota.

Deployments

Deployments
The number of times the application has been uploaded by a developer. The current quota is 10,000 per day.

An application is limited to 10,000 uploaded files per version. Each file is limited to a maximum size of 32 megabytes. Additionally, if the total size of all files for all versions exceeds the initial free 1 gigabyte, then there will be a $ 0.026 per GB per month charge.

Instance hours

Instance usage is billed by instance uptime, at a given hourly rate. Billable time starts when an instance starts, and ends fifteen minutes after it shuts down. There is no billing for idle instances above the maximum number of idle instances set in the Performance Settings tab of the Cloud Platform Console.

There are separate free daily quotas for frontend and backend instances. Note that when you use the Modules API, the module's instance class determines which quota applies.

Resource or API Call Free Quota
Frontend Instances (Automatic Scaling Modules) 28 free instance-hours per day
Backend Instances (Basic and Manual Scaling Modules) 9 free instance-hours per day

Logs

The Logs API is metered when log data is retrieved, and is available for both paid and free apps.

Logs storage contains request logs and application logs for an application, and is available for both paid and free apps. For paid apps, you can increase total logs storage size and/or log data retention time, using the Log Retention setting in the Cloud Platform Console.

Resource Free Default Limit Billing Enabled Default Limit
Logs data retrieval 100 megabytes No maximum for paid app.
Logs data 1 gigabyte Log data kept for a maximum of 30 days.

Mail

App Engine bills for email use "by message," counting each email to each recipient. For example, sending one email to ten recipients counts as ten messages.

Mail API Calls
The total number of times the application accessed the mail service to send a message.
Messages Sent
The total number of messages (email/recipient pairs) that have been sent by the application. Note that the maximum quota for Messages Sent stays at free levels until the first charge for your application has cleared.
Admin Emails
The total number of messages to application admins that have been sent by the application. (The total size limit for each admin email, including headers, attachments, and body, is 16KB).
Message Body Data Sent
The amount of data sent in the body of email messages. This also counts toward the Outgoing Bandwidth quota.
Attachments Sent
The total number of attachments sent with email messages.
Attachment Data Sent
The amount of data sent as attachments to email messages. This also counts toward the Outgoing Bandwidth quota.
Resource Daily Limit Maximum Rate
Mail API Calls 100 calls 32 calls/minute
Messages Sent 100 messages 8 messages/minute
Admins Emailed 5,000 mails 24 mails/minute
Message Body Data Sent 60 MB 340 KB/minute
Attachments Sent 2,000 attachments 8 attachments/minute
Attachment Data Sent 100 MB 10 MB/minute

Increasing your daily mail quota

If your app needs to send more than 100 messages per day, you can send mail with SendGrid, which has a higher quota.

Requests

Outgoing Bandwidth (billable)

The amount of data sent by the application in response to requests.

This includes:

  • data served in response to both secure requests and non-secure requests by application servers, static file servers, or the Blobstore
  • data sent in email messages
  • data sent over XMPP or the Channel API
  • data in outgoing HTTP requests sent by the URL fetch service.
Incoming Bandwidth

The amount of data received by the application from requests. Each incoming HTTP request can be no larger than 32MB.

This includes:

  • data received by the application in secure requests and non-secure requests
  • uploads to the Blobstore
  • data received in response to HTTP requests by the URL fetch service
Secure Outgoing Bandwidth
The amount of data sent by the application over a secure connection in response to requests. Secure outgoing bandwidth also counts toward the Outgoing Bandwidth quota.
Secure Incoming Bandwidth
The amount of data received by the application over a secure connection from requests. Secure incoming bandwidth also counts toward the Incoming Bandwidth quota.
Resource Free Default Limit Billing Enabled Default Limit
Daily Limit Maximum Rate Daily Limit Maximum Rate
Outgoing Bandwidth (billable, includes HTTPS) 1 GB 56 MB/minute 1 GB free; 14,400 GB maximum 10 GB/minute
Incoming Bandwidth (includes HTTPS) 1 GB; 14,400 GB maximum 56 MB/minute None None

Free quotas for Search are listed in the table below. Refer to the Java, Python, and Go documentation for a detailed description of each type of Search call.

Once billing is turned on, Search API resources are charged according to the rates on the pricing schedule.

Resource or API Call Free Quota
Total Storage (Documents and Indexes) 0.25 GB
Queries 1000 queries per day
Adding documents to Indexes 0.01 GB per day

The application console quota section displays a raw count of API requests. Note that when indexing multiple documents in a single call, the call count is increased by the number of documents.

The Search API imposes these limits to ensure the reliability of the service:

  • 100 aggregated minutes of query execution time per minute
  • 15,000 Documents added/deleted per minute
In addition, there is a limit of 10GB storage per index. When an app tries to exceed this amount, an insufficient quota error is returned. This limit may be increased to up to 200GB by submitting a request.

Note: Although these limits are enforced by the minute, the Cloud Platform Console displays the daily totals for each. Customers with Silver, Gold, or Platinum support can request higher throughput limits by contacting their support representative.

Sockets

Daily Data and Per-Minute (Burst) Data Limits
Applications using sockets are rate limited on a per minute and a per day basis. Per minute limits are set to handle burst behavior from applications.
Resource Per Day Limits Per Minute (Burst) Limits
Socket Bind Count864,0004,800
Socket Create Count864,0004,800
Socket Connect Count864,0004,800
Socket Send Count663,552,0003,686,400
Socket Receive Count663,552,0003,686,400
Socket Bytes Received20 GB113 MB
Socket Bytes Sent20 GB113 MB

Task Queues

Task Queues API Calls
The total number of times the application called the Task Queues API to enqueue a task.
Task Queues Stored Task Count
The total number of tasks the application has enqueued that are not yet executed.
Task Queues Stored Task Bytes
The bytes consumed by tasks the application has enqueued that are not yet executed. This quota is counted as part of Stored Data (billable).

When a task executes, its associated requests count toward the application request quotas

These limits apply to all task queues:

Resource Free Default Limit Billing Enabled Default Limit
Daily Limit Maximum Rate Daily Limit Maximum Rate
Task Queues API Calls 100,000 n/a 1,000,000,000 n/a
Task Queues Management Calls (using the Cloud Platform Console) 10,000 n/a 10,000 n/a
Resource Free Default Limit Billing Enabled Default Limit
Task Queues Stored Task Count 1,000,000 10,000,000,000
Task Queues Stored Task Bytes 500 MB. Configurable up to 1 GB. None. Configurable up to the Stored Data (billable).
Maximum number of queues (includes both push and pull queues but not the default queue) 10 queues. 100 queues.

Note: Once a task has been executed or deleted, the storage it uses is freed. Your storage quota is updated at regular intervals and might not show the reclaimed space immediately. You can configure the Stored Task Bytes Limit by adjusting your queue configuration. See the Python, Java, or Go, or PHP documentation for more details.

The following limits apply to task queues according to their type:

Push Queue Limits
Maximum task size100KB
Queue execution rate500 task invocations per second per queue
Maximum countdown/ETA for a task30 days from the current date and time
Maximum number of tasks that can be added in a batch100 tasks
Maximum number of tasks that can be added in a transaction5 tasks
Pull Queue Limits
Maximum task size1MB
Maximum countdown/ETA for a task 30 days from the current date and time
Maximum number of tasks that can be added in a batch 100 tasks
Maximum number of tasks that can be added in a transaction 5 tasks
Maximum number of tasks that you can lease in a single operation 1000 tasks
Maximum payload size when leasing a batch of tasks32MB (1MB when using the REST API)

URL fetch

URL Fetch API Calls
The total number of times the application accessed the URL fetch service to perform an HTTP or HTTPS request.
URL Fetch Data Sent
The amount of data sent to the URL fetch service in requests. This also counts toward the Outgoing Bandwidth quota.
URL Fetch Data Received
The amount of data received from the URL fetch service in responses. This also counts toward the Incoming Bandwidth quota.
Resource Free Default Limit Billing Enabled Default Limit
Daily Limit Maximum Rate Daily Limit Maximum Rate
UrlFetch API Calls 657,000 calls 3,000 calls/minute 860,000,000 calls 660,000 calls/minute
UrlFetch Data Sent 4 GB 22 MB/minute 4.5 TB 3,600 MB/minute
UrlFetch Data Received 4 GB 22 MB/minute 4.5 TB 3,600 MB/minute

XMPP

XMPP API Calls
The total number of times the application accessed the XMPP service.
XMPP Data Sent
The amount of data sent via the XMPP service. This also counts toward the Outgoing Bandwidth quota.
Recipients Messaged
The total number of recipients to whom the application has sent XMPP messages.
Invitations Sent
The total number of chat invitations sent by the application.
Stanzas Sent
XMPP stanzas sent when the application sends a message, invitation, or presence information.
Resource Free Default Limit Billing Enabled Default Limit
Daily Limit Maximum Rate Daily Limit Maximum Rate
XMPP API Calls 46,000,000 calls 257,280 calls/minute 46,000,000 calls 257,280 calls/minute
XMPP Data Sent 1 GB 5.81 GB/minute 1,046 GB 5.81 GB/minute
XMPP Recipients Messaged 46,000,000 recipients 257,280 recipients/minute 46,000,000 recipients 257,280 recipients/minute
XMPP Invitations Sent 100,000 invitations 2,000 invitations/minute 100,000 invitations 2,000 invitations/minute
XMPP Stanzas Sent 10,000 stanzas n/a Based on your spending limit n/a