---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/segment/connections/storage/warehouses/warehouse-errors#article
headline: Warehouse Errors
description: Troubleshoot common Segment warehouse sync errors for Redshift, Postgres, and Snowflake, including permission, credential, networking, and schema errors.
url: https://www.twilio.com/docs/segment/connections/storage/warehouses/warehouse-errors
inLanguage: en
dateModified: 2026-10-22T06:10:39.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# Warehouse Errors

This page lists common errors you might encounter when syncing data to your Segment warehouse, along with their causes and how to resolve them.

## ERROR: Schema "XXX" does not exist. (SQLSTATE 3F000)

This is a permissioning issue. To learn how to set up proper permissions, see the [Postgres](/docs/segment/connections/storage/catalog/postgres/) and [Redshift](/docs/segment/connections/storage/catalog/redshift/) guides.

## ERROR: Cannot execute query because system is in resize mode (SQLSTATE 57014)

This error occurs when your cluster is resizing. The warehouse continues on its scheduled run interval. Once the resize completes, Segment loads all data from the failed run.

## ERROR: 1040 (SQLSTATE XX000)

This is a Redshift 500 - an internal server error. This is usually caused by having too many tables or too many columns. See [Column limits](#column-limits) for the maximum columns per table. If you're seeing this error, [contact the Segment Support team](https://segment.com/help/contact/).

## read tcp XXX.XX.XX.XXXX:XXXX-XXX.XX.XX.XXXX:XXXX: read: connection timed out

This is a networking error that typically arises when Redshift doesn't close properly close the connection or gets rebooted.

If you see this error on consecutive syncs, [contact the Segment Support team](https://segment.com/help/contact/).

## pq: role "XXX" is not permitted to log in

This is a permissioning issue. To learn how to set up proper permissions, see the [Postgres](/docs/segment/connections/storage/catalog/postgres/) and [Redshift](/docs/segment/connections/storage/catalog/redshift/) guides.

## pq: password authentication failed for user "XXX";

This is a credential issue. To fix your credentials, head over to Warehouse > Settings > Connection.

## dial tcp: lookup XXX-hostname on 10.50.0.2:53: no such host

This is a credential issue. To fix your credentials, head over to Warehouse > Settings > Connection.

## dial tcp XX.XXX.XXX.XXX:XXXX: getsockopt: connection timed out / refused

This is a networking error. The connection times out because Redshift doesn't close properly or gets rebooted.

If you see this error on consecutive syncs, [contact the Segment Support team](https://segment.com/help/contact/).

## ERROR: syntax error at or near "ENCODE"; (SQLSTATE 42601)

This occurs when a Postgres database is incorrectly connected as Redshift. To resolve this, delete the warehouse and reconnect, using the Postgres set up option.

## Error during deduping step for collectionXXX: EOF

This error is generally a network error when Redshift closes the connection. If the problem persists on multiple runs, [contact the Segment Support team](https://segment.com/help/contact/).

## ERROR: permission denied for relation update (SQLSTATE 42501)

This is a permissioning issue. To learn how to set up proper permissions, see the [Postgres](/docs/segment/connections/storage/catalog/postgres/) and [Redshift](/docs/segment/connections/storage/catalog/redshift/) guides.

## EOF

This error is generally a network error when Redshift closes the connection. If the problem persists on multiple runs, [contact the Segment Support team](https://segment.com/help/contact/).

## ERROR: failed to create table: 002318 (42601): SQL compilation error: invalid column definition name "XXX" (ANSI reserved)

This error indicates that a column that is attempting to sync has the same title as a reserved keyword in Snowflake. More information regarding Snowflake's reserved keywords can be found [in Snowflake's docs](https://docs.snowflake.com/en/sql-reference/reserved-keywords).

## Column limits

Most warehouses limit the number of columns that a table can have or that a single load can write. Segment creates a column for each property in a collection, so a collection with many unique or dynamically generated property names can exceed the limit. When a collection exceeds the limit, Segment can't load data into it and the sync reports an error for that collection.

| Warehouse                                                                        | Column limit                                                            |
| -------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [Redshift](/docs/segment/connections/storage/catalog/redshift/)                  | 1,600 per table                                                         |
| [Postgres](/docs/segment/connections/storage/catalog/postgres/)                  | 1,600 per table                                                         |
| [BigQuery](/docs/segment/connections/storage/catalog/bigquery/)                  | 10,000 per table                                                        |
| [Snowflake](/docs/segment/connections/storage/catalog/snowflake/)                | 4,096 per load. See [Snowflake](#snowflake) below for more information. |
| [Databricks](/docs/segment/connections/storage/catalog/databricks/)              | No published limit                                                      |
| [Azure Synapse Analytics](/docs/segment/connections/storage/catalog/azuresqldw/) | 1,024 per table                                                         |

Properties you disable with [Selective Sync](/docs/segment/connections/storage/warehouses/warehouse-syncs/#warehouse-selective-sync) aren't loaded, so disabling unused properties reduces the number of columns in the collection.

### Snowflake

Snowflake doesn't have a hard limit on the number of columns in a table, but it does limit the number of columns a single load can write. Segment loads data with Snowflake's `COPY INTO` command, which can write at most 4,096 columns in a single query. Segment loads every enabled column in a collection on each sync, whether or not the events in that sync include it, so the number of enabled columns in the collection is what counts. When a collection has more than 4,096 enabled columns, the sync fails with this error:

```text
SQL compilation error: column '$4097' does not exist
```

Snowflake can also reject new columns with this error:

```text
Operation failed because soft limit on objects of type 'Column' per table was exceeded.
```

To resolve either error, reduce the number of columns in the collection. See [Reduce the number of columns](#reduce-the-number-of-columns).

### Reduce the number of columns

To bring a collection under its limit:

* Find properties with dynamically generated names, such as IDs or timestamps used as property keys, and send those values as property values instead.
* Disable properties you don't need in the warehouse with [Selective Sync](/docs/segment/connections/storage/warehouses/warehouse-syncs/#warehouse-selective-sync).

If you still see the error after reducing the columns, [contact the Segment Support team](https://segment.com/help/contact/).
