Service operation - Resources
Timescale Cloud contains several mechanisms for managing disk space on your services. There are four key tasks that Cloud performs to handle disk space:
- Detect if storage capacity begins to fill up
- Notify you about the growth of storage consumption
- Automatically activate overload protections
- Allow you to return your database to a normal state
By default, Timescale Cloud services have autoscaling enabled. Autoscaling automatically increases your disk size, up to a maximum amount, as you fill the disk. For more information about autoscaling, including instructions for setting the maximum limit, or turning autoscaling off, see the autoscaling section.
You can increase your storage size in the Timescale Cloud console.
You can only increase your service's storage once every six hours, and you cannot currently decrease your storage size once set.
Increasing service resources
- In the Timescale Cloud console, navigate to
Servicesand click the service you want to adjust. Navigate to the
Operationstab, and go to the
- Adjust the sliders for CPU and disk size as required. If you increase the disk size past a certain point, we also recommend increasing the CPU size to handle the increased disk size (although not required).
- Review the new sizes and costs in the panel on the right-hand side, and
Restart and applywhen you are happy with the changes.
- The resources take a few seconds to increase, and when the increase is complete, your database is immediately available on the new resources. If your database is in read-only mode, the read-only protection is automatically removed, and you can begin writing data immediately.
If you need to perform actions on your database to reduce your data usage, you can turn off read-only mode. For example, you need read-write access if you want to compress data, delete rows or tables, or drop old data using data retention policies.
Do not manually enable read-write access on a database that is over 99% capacity. Increase the disk size before you enable read-write access. Alternatively, you can enable read-write access on an individual session, while leaving the database in read-only mode.
Enabling read-write access on an individual session
- Connect to your database using
psqland turn off read-only protection for the current session:
SET default_transaction_read_only TO off;
- Create a data retention policy to only retain, for example, data for 90
days. This starts working immediately on old data:
SELECT add_retention_policy('<table_name>', interval '90 days');
- Turn on compression:
ALTER TABLE <table_name> SET ( timescaledb.compress, timescaledb.compress_segmentby = '<type>' ); SELECT add_compression_policy('<table_name>', interval '1 day');
As soon as the storage consumption drops below the threshold, the read-only protection is automatically removed, and you can start writing data again.
If you run intensive queries on your Timescale Cloud services, you might encounter out of memory (OOM) errors. This occurs if your query consumes more memory than is available.
When this happens, an
OOM killer process shuts down PostgreSQL processes using
SIGKILL commands, until the memory usage falls below the upper limit. Because
this kills the entire server process, it usually requires a restart. To
prevent service disruption caused by OOM errors, Timescale Cloud attempts to
shut down only the query that caused the problem. This means that the
problematic query does not run, but that your PostgreSQL service continues to
If the normal OOM killer is triggered, the error log looks like this:
2021-09-09 18:15:08 UTC :TimescaleDB: LOG: server process (PID 2351983) was terminated by signal 9: Killed
Wait for the entire service to come back online before reconnecting.
If Timescale Cloud successfully guards the service against the OOM killer, it shuts down only the client connection that was using too much memory. This prevents the entire PostgreSQL service from shutting down, so you can reconnect immediately. The error log looks like this:
2022-02-03 17:12:04 UTC :TimescaleDB: [email protected],app=psql  ERROR: out of memory
Found an issue on this page?Report an issue!