<@U04S8PLJWMT> Unexpected Exception java.lang.Null...
# ask-ai
k
@kapa.ai Unexpected Exception java.lang.NullPointerException: Cannot invoke "io.airbyte.api.model.generated.AirbyteCatalog.getStreams()" because "discovered" is null
k
The error message:
Copy code
java.lang.NullPointerException: Cannot invoke "io.airbyte.api.model.generated.AirbyteCatalog.getStreams()" because "discovered" is null
indicates that Airbyte is attempting to access the streams from an AirbyteCatalog object, but the catalog object (
discovered
) is null at that point in the code. This typically happens during schema discovery or when updating a connection's schema. This issue has been observed in several contexts: - When the schema discovery process fails and returns a null catalog, but the code still tries to access its streams. For example, in the MongoDB connector and Mixpanel connector, this error appears if the discovery step does not return a valid catalog object, possibly due to an upstream failure or misconfiguration. The stack trace points to
WebBackendConnectionsHandler.updateSchemaWithDiscovery
as the location where the null is not handled gracefully, leading to the exception. The root cause is often a failed or incomplete schema discovery, which should be checked in the logs for more details about why the catalog is null. See related discussions for MongoDB and Mixpanel connectors for more context [here](https://discuss.airbyte.io/t/1011) and [here](https://discuss.airbyte.io/t/2814). - The error can also occur if there is a performance degradation or a timeout during the discovery process, resulting in a null response that is not properly checked before use. How to address this: - Check the logs preceding the exception for errors during the schema discovery phase. There may be a more informative error message indicating why the catalog is null. - Ensure that the source connector is configured correctly and that the source system is accessible and responsive. - If this is a recurring issue, consider updating Airbyte to the latest version, as some related bugs have been fixed in newer releases. - If you are developing a custom connector, make sure to handle null returns from the discovery process gracefully and provide meaningful error messages. If you need more specific troubleshooting, please provide the full logs around the time of the error, as the root cause is often found earlier in the log output. References: [Severe Performance Degradation Mongo Connector](https://discuss.airbyte.io/t/1011), [Mixpanel connector issue](https://discuss.airbyte.io/t/2814)
k
@kapa.ai Is the any configuration we need to do for handling large datasets while discover?
k
A message from kapa.ai
Yes, there are several configurations you can adjust in Airbyte to better handle large datasets during schema discovery: 1. Increase Schema Discovery Timeouts If you have sources with hundreds or thousands of tables and columns, schema discovery can take a long time and may hit default timeout limits. You can increase the timeout by setting the following environment variables in your `values.yaml`:
Copy code
yaml    server:      extraEnv:        - name: HTTP_IDLE_TIMEOUT          value: 20m        - name: READ_TIMEOUT          value: 30m
For Helm chart V2, you can also use:
Copy code
yaml    server:      httpIdleTimeout: 20m      extraEnv:        - name: READ_TIMEOUT          value: 30m
This will allow the discovery process to run longer before timing out, which is often necessary for large schemas [Scaling Airbyte: Schema Discovery Timeouts](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte#schema-discovery-timeouts). 2. Limit the Number of Fields per Connection Airbyte allows you to control the maximum number of fields per connection using the
MAX_FIELDS_PER_CONNECTION
environment variable. By default, this is set to 20,000 fields across enabled streams, but you can adjust it as needed to fit your use case [April 2024 Release Notes](https://docs.airbyte.com/release_notes/april_2024). 3. Reduce the Scope of Discovery For some sources (like S3 or MongoDB), you can limit the discovery to a subset of data (e.g., by using a path prefix or limiting user permissions to only necessary collections/tables). This can significantly speed up discovery and reduce resource usage [Forum: S3 Schema Discovery](https://discuss.airbyte.io/t/1101), [Forum: MongoDB Timeout](https://discuss.airbyte.io/t/2665). 4. Increase Maximum Request Size If you encounter errors like "Request Entity Too Large" (HTTP 413), you may need to increase the maximum request size for the Airbyte server and your ingress/proxy (e.g., NGINX). This is especially relevant for very large schemas [GitHub Issue #4564](https://github.com/airbytehq/airbyte/issues/4564). Summary: Adjusting timeouts, limiting the scope of discovery, increasing field limits, and tuning request size are the main configurations to help Airbyte handle large datasets during schema discovery. Always monitor logs for specific errors to guide further tuning.
k
@kapa.ai We have already set timeout in ingress, do we still need to update in values.yaml?
k
A message from kapa.ai
Yes, you still need to update the timeout values in
values.yaml
in addition to setting them in your ingress configuration. Setting timeouts in the ingress (such as NGINX or a load balancer) only controls how long the proxy will wait for a response from the Airbyte backend. However, Airbyte itself has internal timeout settings (like
HTTP_IDLE_TIMEOUT
and
READ_TIMEOUT
) that determine how long the server will allow operations like schema discovery to run. If these internal timeouts are shorter than your ingress timeouts, the Airbyte server may terminate the operation before the ingress timeout is reached, resulting in failed discovery for large datasets. The official Airbyte documentation specifically recommends increasing these values in your
values.yaml
file to handle long-running schema discovery jobs:
Copy code
yaml server:   extraEnv:     - name: HTTP_IDLE_TIMEOUT       value: 20m     - name: READ_TIMEOUT       value: 30m
or for Helm chart V2:
Copy code
yaml server:   httpIdleTimeout: 20m   extraEnv:     - name: READ_TIMEOUT       value: 30m
This ensures that both the ingress and the Airbyte backend are configured to allow sufficient time for large schema discovery operations to complete successfully [Scaling Airbyte: Schema Discovery Timeouts](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte#schema-discovery-timeouts). So, both configurations are necessary and should be aligned for best results.
k
@kapa.ai Discovering schema failed Workload failed, source: unknown Internal message: Failed to find output files from connector within timeout of 9 minute(s). Is the connector still running?
k
A message from kapa.ai
The error message: > Discovering schema failed > Workload failed, source: unknown > Internal message: Failed to find output files from connector within timeout of 9 minute(s). Is the connector still running? means that Airbyte was unable to complete the schema discovery process within the allowed time (9 minutes). This is a common issue when working with large datasets or sources with many tables/fields, as the discovery process can take longer than the default timeout. What you can do: - Increase Airbyte's Internal Timeouts: Even if you have already increased the timeout in your ingress or load balancer, you also need to increase the internal Airbyte server timeouts. This is done by setting environment variables in your
values.yaml
file (for Helm deployments):
Copy code
yaml   server:     extraEnv:       - name: HTTP_IDLE_TIMEOUT         value: 20m       - name: READ_TIMEOUT         value: 30m
For Helm chart V2, you can use:
Copy code
yaml   server:     httpIdleTimeout: 20m     extraEnv:       - name: READ_TIMEOUT         value: 30m
This will allow schema discovery to run longer and help avoid the 9-minute timeout error [Scaling Airbyte: Schema Discovery Timeouts](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte#schema-discovery-timeouts). - Why both ingress and Airbyte timeouts matter: The ingress timeout only controls how long the proxy waits for a response, but Airbyte's own server timeouts can still terminate the operation early if not increased. Both must be set appropriately for large or slow schema discovery operations. If you continue to see this error after increasing the timeouts, check the connector logs for additional errors or misconfigurations that might be causing the discovery to hang or fail to produce output files [GitHub Issue #54684](https://github.com/airbytehq/airbyte/issues/54684). Summary: You need to increase Airbyte's internal timeouts in addition to your ingress settings to successfully handle schema discovery for large datasets.
k
@kapa.ai, Now error for discover schema showing as Airbyte is temporarily unavailable. Please try again. (HTTP 502)
k
A message from kapa.ai
The error message: > Airbyte is temporarily unavailable. Please try again. (HTTP 502) during schema discovery is a common symptom when the discovery process takes too long, fails internally, or when there are misconfigurations between Airbyte components. Based on the knowledge sources, here are the most likely causes and solutions: 1. Timeouts Not Fully Increased Even if you have increased the ingress timeout, you must also increase Airbyte's internal server timeouts. This is done by setting
HTTP_IDLE_TIMEOUT
and
READ_TIMEOUT
in your
values.yaml
file. If these are not set high enough, Airbyte may terminate the discovery process before it completes, resulting in a 502 error [Scaling Airbyte: Schema Discovery Timeouts](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte#schema-discovery-timeouts). 2. Large Schema or Slow Source If your source has a very large schema (many tables/fields), the discovery process can exceed default timeouts or resource limits. Increasing the timeouts as described above is necessary. Also, consider limiting the scope of discovery if possible (e.g., by restricting user permissions or selecting only required tables) [Forum: MongoDB Timeout](https://discuss.airbyte.io/t/2665). 3. Workload API Authentication Issues In some Airbyte deployments (especially with
abctl
or Kubernetes), a 502 error can occur if the authentication tokens between the worker, workload API server, and main server are not aligned. You may need to set the same
WORKLOAD_API_BEARER_TOKEN
and
WORKLOAD_API_AUTH_HEADER
on all relevant deployments and restart them. This has been reported as a root cause for 502 errors during connector setup and schema discovery [GitHub Issue #65567](https://github.com/airbytehq/airbyte/issues/65567). 4. Request Size Limits If your schema is very large, you may also hit request size limits (HTTP 413 errors), but these can sometimes manifest as 502 errors depending on your proxy setup. Ensure your ingress/proxy and Airbyte server are configured to allow large request bodies [GitHub Issue #4564](https://github.com/airbytehq/airbyte/issues/4564). Action Steps: - Double-check that you have increased both ingress and Airbyte server timeouts. - If using Kubernetes, ensure all relevant pods have the correct authentication tokens set. - Check Airbyte and connector logs for more specific error messages. - If the schema is extremely large, consider limiting the number of tables/fields being discovered. If you have already set the timeouts and are still seeing the error, the knowledge sources suggest checking for authentication token mismatches or request size issues as the next steps. If you need more detailed troubleshooting, please provide relevant log excerpts from the Airbyte server and connector pods.
k
@kapa.ai Do we need to increase timeout in webapp or anywhere else?
k
A message from kapa.ai
Based on the available knowledge sources, the primary recommendation for handling large schema discovery timeouts is to increase the timeout values in the Airbyte server configuration (
values.yaml
), specifically using the
HTTP_IDLE_TIMEOUT
and
READ_TIMEOUT
environment variables under the
server
section. There is no explicit mention in the documentation or issues about needing to increase timeouts specifically in the
webapp
component or elsewhere beyond the server and ingress/load balancer settings. Here’s the recommended configuration for the server:
Copy code
yaml server:   extraEnv:     - name: HTTP_IDLE_TIMEOUT       value: 20m     - name: READ_TIMEOUT       value: 30m
Or for Helm chart V2:
Copy code
yaml server:   httpIdleTimeout: 20m   extraEnv:     - name: READ_TIMEOUT       value: 30m
The documentation and user reports focus on these server-side settings and ingress timeouts as the key places to adjust for long-running schema discovery. There is no evidence in the knowledge sources that increasing timeouts in the
webapp
is required or recommended for this purpose [Scaling Airbyte: Schema Discovery Timeouts](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte#schema-discovery-timeouts). If you continue to experience issues after increasing these timeouts, it is advisable to check logs for other possible causes, but increasing timeouts in the
webapp
is not mentioned as necessary in the official guidance.
k
@kapa.ai we increase in ingress and values.yaml still getting error "Discovering schema failed Workload failed, source: unknown Failed to find output files from connector"
k
A message from kapa.ai
If you have already increased the timeouts in both your ingress and
values.yaml
(Airbyte server), but are still seeing the error: > Discovering schema failed > Workload failed, source: unknown > Failed to find output files from connector within timeout of 9 minute(s). Is the connector still running? the knowledge sources suggest a few additional considerations: 1. Timeouts Must Be Set in All Relevant Places Both the ingress and Airbyte server timeouts must be increased. The server settings should look like this in your `values.yaml`:
Copy code
yaml    server:      extraEnv:        - name: HTTP_IDLE_TIMEOUT          value: 20m        - name: READ_TIMEOUT          value: 30m
or for Helm V2:
Copy code
yaml    server:      httpIdleTimeout: 20m      extraEnv:        - name: READ_TIMEOUT          value: 30m
This is confirmed in the official documentation and multiple user reports [Scaling Airbyte: Schema Discovery Timeouts](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte#schema-discovery-timeouts). 2. Large Schema or Connector Performance If your source has a very large schema (many tables/fields), the connector may still not finish discovery in time, or may run into resource limits. The documentation suggests limiting the scope of discovery (e.g., by restricting user permissions or selecting only required tables) to speed up the process [Forum: MongoDB Timeout](https://discuss.airbyte.io/t/2665). 3. Connector or Platform Issues In some cases, even after increasing timeouts, users have reported that schema discovery fails due to connector bugs, platform issues, or resource exhaustion. For example, there are open issues where users increased all timeouts but still encountered 413 or timeout errors, especially with very large schemas [GitHub Issue #4564](https://github.com/airbytehq/airbyte/issues/4564), [GitHub Issue #56914](https://github.com/airbytehq/airbyte/issues/56914). 4. No Further Configuration Mentioned The knowledge sources do not mention any additional configuration (such as in the webapp or elsewhere) that would resolve this specific error. If you have already increased all relevant timeouts and are still seeing the error, it may be a limitation of the connector or a bug. Summary: If you have increased both ingress and server timeouts and still see this error, it is likely due to the size/complexity of your schema or a connector/platform limitation. The knowledge sources do not provide further configuration steps beyond what you have already done. You may need to consider reducing the scope of discovery or splitting your data, and if the problem persists, report it as a bug with detailed logs for further investigation [GitHub Issue #56914](https://github.com/airbytehq/airbyte/issues/56914), [Scaling Airbyte: Schema Discovery Timeouts](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte#schema-discovery-timeouts). If you can share connector logs, it may help pinpoint the root cause.
k
@kapa.ai What configuration we need to do in ingress to increase discover timeout?
k
A message from kapa.ai
To increase the schema discovery timeout in your ingress for Airbyte, you need to set specific annotations in your ingress resource to extend the proxy and read timeouts. The knowledge sources provide the following example for an NGINX ingress:
Copy code
yaml apiVersion: networking.k8s.io/v1   kind: Ingress   metadata:     name: airbyte-ingress   annotations:       nginx.ingress.kubernetes.io/ssl-redirect: "false"     nginx.ingress.kubernetes.io/proxy-read-timeout: "1800"     nginx.ingress.kubernetes.io/proxy-send-timeout: "1800"     nginx.ingress.kubernetes.io/proxy-body-size: 16m spec:     ingressClassName: nginx     rules:       - host: airbyte.example.com       http:           paths:             - backend:                 service:                   name: airbyte-airbyte-server-svc                   port:                     number: 8001             path: /             pathType: Prefix
-
nginx.ingress.kubernetes.io/proxy-read-timeout
and
nginx.ingress.kubernetes.io/proxy-send-timeout
control how long the ingress will wait for a response from the Airbyte backend. -
nginx.ingress.kubernetes.io/proxy-body-size
can be increased if you expect large payloads during schema discovery. Note: You must also increase the internal Airbyte server timeouts in your
values.yaml
file for the changes to be fully effective. Adjusting only the ingress timeouts is not sufficient for large or slow schema discovery operations [Scaling Airbyte: Schema Discovery Timeouts](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte#schema-discovery-timeouts), [Airbyte & Snowflake connector discussion](https://github.com/airbytehq/airbyte/discussions/45946). If you are using a different ingress controller (such as AWS ALB), refer to the relevant documentation for equivalent timeout settings [Ingress documentation](https://docs.airbyte.com/platform/deploying-airbyte/integrations/ingress).
k
@kapa.ai Please send sample values.yaml to resolve discover schema issues
k
A message from kapa.ai
Certainly! Below is a sample
values.yaml
configuration recommended by the Airbyte documentation to help resolve schema discovery timeout issues, especially for large datasets. This configuration increases the relevant server timeouts:
Copy code
yaml server:   extraEnv:     - name: HTTP_IDLE_TIMEOUT       value: 20m     - name: READ_TIMEOUT       value: 30m
For Helm chart V2, you can use:
Copy code
yaml server:   httpIdleTimeout: 20m   extraEnv:     - name: READ_TIMEOUT       value: 30m
These settings should be added to your
values.yaml
file and applied when deploying or upgrading Airbyte. They ensure that the Airbyte server allows long-running schema discovery operations to complete, which is often necessary for sources with many tables or fields [Scaling Airbyte: Schema Discovery Timeouts](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte#schema-discovery-timeouts). Note: You should also ensure your ingress (e.g., NGINX) timeouts are increased to match or exceed these values for best results.
k
@kapa.ai Only for server? do we need to update for webapp or worker or global ?
k
A message from kapa.ai
Based on the official Airbyte documentation and related knowledge sources, the primary timeout settings for resolving schema discovery issues should be configured under the
server
section in your
values.yaml
file
. There is no explicit requirement or recommendation in the knowledge sources to set these timeouts for
webapp
,
worker
, or
global
sections for the purpose of schema discovery timeouts. The documentation specifically provides examples only for the
server
section:
Copy code
yaml server:   extraEnv:     - name: HTTP_IDLE_TIMEOUT       value: 20m     - name: READ_TIMEOUT       value: 30m
or for Helm chart V2:
Copy code
yaml server:   httpIdleTimeout: 20m   extraEnv:     - name: READ_TIMEOUT       value: 30m
There is no mention in the knowledge sources that you need to update these timeout values for
webapp
,
worker
, or
global
to resolve schema discovery timeout issues [Scaling Airbyte: Schema Discovery Timeouts](https://docs.airbyte.com/platform/enterprise-setup/scaling-airbyte#schema-discovery-timeouts). If you are still experiencing issues after updating the
server
section, the problem may be related to connector limitations, resource constraints, or other factors, but the documentation does not advise setting these timeouts elsewhere for schema discovery.
k
@kapa.ai after updated values.yaml for server component, we still seeing timeout after 9minutes.
k
A message from kapa.ai
If you have already updated the
values.yaml
for the server component with increased timeouts (such as
HTTP_IDLE_TIMEOUT
and
READ_TIMEOUT
), but are still seeing schema discovery time out after 9 minutes, the knowledge sources suggest a few possible reasons and next steps: 1. Connector Sidecar Timeout There is a known limitation where the connector sidecar has its own internal timeout (e.g.,
SIDECAR_FILE_TIMEOUT_MINUTES
), which defaults to 9 minutes and is not exposed for configuration via the Helm chart or standard environment variables. If the connector does not finish discovery and produce output files within this period, you will see errors like: > Failed to find output files from connector within timeout of 9 minute(s). Is the connector still running? The only documented workaround is to build a custom Docker image for the connector sidecar with increased timeout values, for example:
Copy code
dockerfile    FROM airbyte/connector-sidecar:1.2.0    ENV SIDECAR_FILE_TIMEOUT_MINUTES=30    ENV SIDECAR_FILE_TIMEOUT_WITHIN_SYNC_MINUTES=60
This approach is described in [this GitHub issue](https://github.com/airbytehq/airbyte/issues/48855). 2. No Official Helm/values.yaml Setting for Sidecar Timeout As of now, the knowledge sources do not mention a way to configure the sidecar timeout directly via
values.yaml
or Helm. This is a known gap and has been raised by users as a feature request, but the only solution currently is the custom image workaround above. 3. Other Timeouts Ensure that all other relevant timeouts (ingress, load balancer, etc.) are also set higher than your expected discovery duration, but in your case, the persistent 9-minute timeout points specifically to the sidecar limitation. Summary: If schema discovery still times out after 9 minutes despite increasing server and ingress timeouts, you are likely hitting the connector sidecar's hardcoded timeout. The only current solution is to build a custom sidecar image with increased timeout values, as described above. There is no configuration in
values.yaml
or Helm to change this at this time [GitHub Issue #48855](https://github.com/airbytehq/airbyte/issues/48855).