Edgaras Ignatavičius
08/05/2025, 6:03 AMkapa.ai
08/05/2025, 6:04 AMairbyte_source_definition), this typically points to resource constraints, timeouts, or proxy/ingress configuration issues in your Airbyte deployment. Key troubleshooting steps and solutions from the knowledge sources: 1. Resource Constraints Many users report that insufficient CPU or memory allocation to Airbyte or Docker can cause 502/504/524 errors, especially when creating or syncing multiple sources at once. Increasing the resources allocated to your Airbyte instance (or Docker, if running locally) often resolves these errors. For example, one user resolved 504 errors by increasing Docker's memory allocation from 4GB to 12GB. Similarly, scaling up EC2 instances or Kubernetes pod resources can help if you’re running Airbyte in the cloud or on-premises clusters [[source]](https://github.com/airbytehq/airbyte/issues/42404). 2. Proxy/Ingress Timeout Settings If schema discovery or source creation takes longer than the default proxy/ingress timeout, you may see 502/504/524 errors. Increasing the proxy-read-timeout or equivalent setting in your ingress/proxy (e.g., NGINX) can help. This allows longer-running operations (like schema discovery for large sources) to complete without the proxy terminating the connection prematurely [[source]](https://discuss.airbyte.io/t/2976). 3. Concurrency and Load Adding several sources at once can overwhelm the system, especially if each operation is resource-intensive. Try adding sources sequentially or in smaller batches to reduce load and avoid timeouts. 4. Check Airbyte and Infrastructure Logs Review Airbyte server, worker, and proxy logs for more details on the errors. Sometimes, the actual error is masked by the proxy timeout, and logs can reveal underlying issues (e.g., database connectivity, pod scheduling failures, etc.) [[source]](https://github.com/airbytehq/airbyte/issues/42404). 5. Terraform Best Practices There are no Airbyte-specific Terraform limitations mentioned in the sources, but general best practices apply: use depends_on to control resource creation order, and avoid parallelizing too many resource creations if your infrastructure is not sized for it. Summary of actions: - Increase CPU and memory for Airbyte and/or Docker/Kubernetes. - Raise proxy/ingress timeout values. - Add sources in smaller batches. - Check logs for more specific errors. - Ensure your infrastructure can handle the desired concurrency. If you continue to see these errors after making these adjustments, please provide more details about your deployment environment and logs for further troubleshooting. References: - [Proxy/timeout and resource issues causing 502/504 errors](https://github.com/airbytehq/airbyte/issues/42404) - [Timeouts during schema discovery and proxy configuration](https://discuss.airbyte.io/t/2976)kapa.ai
08/05/2025, 6:04 AMairbyte_source_definition), this typically points to timeouts or resource constraints in your Airbyte deployment. Here’s what the knowledge sources suggest: ### Common Causes 1. Resource Constraints: Many users report that insufficient CPU or memory allocation to Airbyte (or Docker/Kubernetes) can cause 502/504/524 errors, especially when creating or syncing multiple sources at once. Increasing the resources allocated to your Airbyte instance often resolves these issues. For example, one user resolved 504 errors by increasing Docker’s memory allocation from 4GB to 12GB. Similarly, scaling up EC2 instances or Kubernetes resources can help if you’re running Airbyte in the cloud or on-premises clusters [source](https://github.com/airbytehq/airbyte/issues/42404). 2. Timeouts During Schema Discovery: When Airbyte tries to fetch schemas from large or complex databases, the operation may exceed the default proxy or API timeouts, resulting in 502/504/524 errors. This is especially common with large databases or sources with thousands of tables [source](https://github.com/airbytehq/airbyte/issues/31278). 3. Ingress/Proxy Timeout Settings: If you’re running Airbyte behind a proxy (like NGINX, which is common with Kubernetes or Docker deployments), the default timeout may be too short for schema discovery or source creation. Increasing the proxy timeout (e.g., proxy-read-timeout in NGINX) can help. Users have reported success by adjusting these settings, especially when using abctl or Helm charts [source](https://github.com/airbytehq/airbyte/issues/29712), [source](https://github.com/airbytehq/airbyte/issues/42404). ### What You Can Do - Increase Resource Allocation: Allocate more CPU and memory to your Airbyte deployment (Docker, Kubernetes, or VM). For Docker, increase the memory in Docker Desktop settings. For Kubernetes, adjust the resource requests/limits in your Helm values or deployment YAML. - Increase Proxy/Ingress Timeouts: If you’re using NGINX or another proxy, increase the timeout settings. For example, set proxy-read-timeout to a higher value (e.g., 300 seconds) to allow long-running schema discovery jobs to complete [source](https://github.com/airbytehq/airbyte/issues/29712). - Stagger Source Creation: Instead of creating many sources simultaneously, try adding them one at a time to reduce load and avoid overwhelming the system. - Check Airbyte and Connector Logs: Review the logs for more specific errors. Sometimes, the root cause is a misconfiguration or a connector-specific issue. - Upgrade Airbyte: Ensure you’re running a recent version of Airbyte, as some timeout and resource handling bugs have been fixed in newer releases. ### Example: Increasing NGINX Timeout (Kubernetes) If you’re using the Helm chart, you can set: yaml ingress: annotations: nginx.ingress.kubernetes.io/proxy-read-timeout: "300" nginx.ingress.kubernetes.io/proxy-send-timeout: "300" Apply the changes and restart your ingress controller. --- In summary, increase your resource allocation, adjust proxy timeouts, and avoid bulk-adding sources simultaneously. These steps should help resolve the 502/524 errors when using Terraform with Airbyte [source](https://github.com/airbytehq/airbyte/issues/42404), [source](https://github.com/airbytehq/airbyte/issues/29712), [source](https://github.com/airbytehq/airbyte/issues/31278).kapa.ai
08/05/2025, 6:05 AMkapa.ai
08/05/2025, 6:05 AMairbyte_source_definition), the most common causes are resource constraints and proxy/ingress timeout settings. What to do: 1. Increase Resource Allocation Insufficient CPU or memory can cause these errors, especially when adding several sources at once. Users have resolved similar issues by increasing the memory allocated to Docker or their Airbyte instance (e.g., from 4GB to 12GB) [see discussion](https://github.com/airbytehq/airbyte/issues/42404). 2. Adjust Proxy/Ingress Timeouts If your ingress or proxy (such as NGINX) has a timeout that is too short, long-running operations like schema discovery or source creation may be cut off, resulting in 502/504/524 errors. Increase the proxy-read-timeout and related settings in your ingress configuration. For example: yaml metadata: annotations: nginx.ingress.kubernetes.io/proxy-read-timeout: "300" nginx.ingress.kubernetes.io/proxy-send-timeout: "300" nginx.ingress.kubernetes.io/proxy-connect-timeout: "300" This allows more time for Airbyte operations to complete before the proxy terminates the connection [see example](https://github.com/airbytehq/airbyte/issues/45156). 3. Reduce Concurrency Adding many sources at once can overwhelm your deployment. Try adding sources in smaller batches or sequentially to reduce load and avoid timeouts. 4. Check Logs for Underlying Issues Sometimes, the actual error is masked by the proxy timeout. Check Airbyte and infrastructure logs for more details on what might be failing [see user experience](https://github.com/airbytehq/airbyte/issues/42404). Summary: - Increase memory/CPU for Airbyte and Docker/Kubernetes. - Raise proxy/ingress timeout values. - Add sources in smaller batches. - Review logs for more details. These steps are based on real user experiences and Airbyte documentation. If the problem persists after these changes, please provide more details about your environment and logs for further troubleshooting.Edgaras Ignatavičius
08/05/2025, 6:08 AMEdgaras Ignatavičius
08/05/2025, 6:08 AMkapa.ai
08/05/2025, 6:08 AMkapa.ai
08/05/2025, 6:09 AMserver and webapp pods is not sufficient to resolve 502/524 errors when adding multiple sources. The main bottleneck is often with the job pods (which handle source checks, discovery, and syncs) and the worker component, not just the server or webapp. What you should do: 1. Increase Resources for Job Pods and Worker - The job pods (which run the actual connector logic) are often the most resource-intensive. You should adjust the resource requests and limits for these pods. - In Kubernetes Helm deployments, you can set these in your values.yaml under global.jobs.resources for all job pods, or use specific environment variables for different job types (e.g., CHECK_JOB_MAIN_CONTAINER_MEMORY_LIMIT, DISCOVER_JOB_MAIN_CONTAINER_MEMORY_LIMIT, etc.) [see this issue](https://github.com/airbytehq/airbyte/issues/48816). - Example: yaml global: jobs: resources: limits: cpu: 2 memory: 4Gi requests: cpu: 1 memory: 2Gi - Or, for more granular control: yaml global: env_vars: CHECK_JOB_MAIN_CONTAINER_MEMORY_LIMIT: 2Gi DISCOVER_JOB_MAIN_CONTAINER_MEMORY_LIMIT: 2Gi # ...and so on for other job types 2. Worker Pod Resources - The worker pod is responsible for launching and managing job pods. If it is under-provisioned, it can also cause failures. Increase its CPU and memory as needed in your `values.yaml`: yaml worker: resources: requests: cpu: 1 memory: 2Gi limits: cpu: 2 memory: 4Gi 3. Check for Resource Limits on All Job Types - Airbyte uses different environment variables for each job type (check, discover, spec, sync). If you only set the generic JOB_MAIN_CONTAINER_* variables, some jobs may still use defaults or cluster-level limits, leading to OOM or timeouts. Set all relevant variables as shown above [see user solution](https://github.com/airbytehq/airbyte/issues/48816). 4. Cluster-Level Resource Limits - If your Kubernetes cluster has a restrictive LimitRange, it may override your pod settings. Make sure your cluster allows the resources you are requesting. Summary: You need to increase resources for the job pods (not just server/webapp) and the worker pod. Set the appropriate resource requests/limits for all job types using the environment variables or the global.jobs.resources block in your Helm values. Also, ensure your cluster is not imposing stricter limits than your pod specs. If you continue to see issues, check the logs of the job pods (e.g., check/discover pods) for OOM or scheduling errors to further diagnose the problem.kapa.ai
08/05/2025, 6:10 AMkapa.ai
08/05/2025, 6:10 AMairbyte_source_definition), the most common causes are resource constraints and timeout issues in your Airbyte deployment. What to do: 1. Increase Resources for Job Pods (Not Just Server/Webapp) - The main resource consumers during source creation are the job pods (e.g., check, discover, sync jobs), not the server or webapp pods. You should increase CPU and memory for these job pods. - In Kubernetes, set resource requests and limits for jobs in your `values.yaml`: yaml global: jobs: resources: limits: cpu: 2 memory: 4Gi requests: cpu: 1 memory: 2Gi - You can also set job-specific environment variables for each job type (e.g., CHECK_JOB_MAIN_CONTAINER_MEMORY_LIMIT, DISCOVER_JOB_MAIN_CONTAINER_MEMORY_LIMIT) to ensure all job types have sufficient resources [Configuring Connector Resources](https://docs.airbyte.com/platform/1.6/operator-guides/configuring-connector-resources). 2. Increase Worker Pod Resources - The worker pod manages job pods. If it is under-provisioned, it can cause failures. Increase its resources in your `values.yaml`: yaml worker: resources: requests: cpu: 1 memory: 2Gi limits: cpu: 2 memory: 4Gi 3. Adjust Proxy/Ingress Timeouts - If your ingress or proxy (e.g., NGINX) has a short timeout, long-running operations may be cut off, resulting in 502/524 errors. Increase the proxy-read-timeout and related settings in your ingress configuration: yaml nginx.ingress.kubernetes.io/proxy-read-timeout: "300" nginx.ingress.kubernetes.io/proxy-send-timeout: "300" - This allows more time for Airbyte operations to complete before the proxy terminates the connection [Scaling Airbyte After Installation](https://docs.airbyte.com/platform/1.6/enterprise-setup/scaling-airbyte#schema-discovery-timeouts). 4. Reduce Concurrency - Adding many sources at once can overwhelm your deployment. Try adding sources in smaller batches or sequentially to reduce load and avoid timeouts [Forum Post](https://github.com/airbytehq/airbyte/issues/42404). 5. Check Logs for Underlying Issues - Sometimes, the actual error is masked by the proxy timeout. Check Airbyte and infrastructure logs for more details on what might be failing. Summary: Focus on increasing resources for job pods and the worker pod, not just the server/webapp. Adjust proxy/ingress timeouts, reduce the number of concurrent source creations, and check logs for more details. These steps are based on Airbyte documentation and real user experiences.Edgaras Ignatavičius
08/05/2025, 6:25 AM2025-08-05 06:23:33,949 [public-api-executor-thread-1] INFO i.a.a.LoggingTrackingClient(track):339 - track. version: 1.7.2, userId: 00000000-0000-0000-0000-000000000000, action: Airbyte_API_Call, metadata: {user_id=00000000-0000-0000-0000-000000000000, endpoint=/public/v1/workspaces/{workspaceId}, operation=GET, status_code=200}
2025-08-05 06:23:34,397 [public-api-executor-thread-2] INFO i.a.a.LoggingTrackingClient(track):339 - track. version: 1.7.2, userId: 00000000-0000-0000-0000-000000000000, action: Airbyte_API_Call, metadata: {user_id=00000000-0000-0000-0000-000000000000, endpoint=/public/v1/destinations/{destinationId}, operation=GET, status_code=200}
2025-08-05 06:24:10,031 [Thread-2] INFO i.m.r.Micronaut(lambda$start$0):118 - Embedded Application shutting downkapa.ai
08/05/2025, 6:25 AMkapa.ai
08/05/2025, 6:25 AM2025-08-05 06:24:10,031 [Thread-2] INFO i.m.r.Micronaut(lambda$start$0):118 - Embedded Application shutting down This message indicates that the Airbyte application (specifically, a Micronaut-based service) is shutting down. However, the log does not provide a direct error or stack trace explaining why the shutdown is occurring. What the knowledge sources say: - There are no explicit references in the knowledge sources to this exact log message or a root cause for a Micronaut application shutdown in this context. - Similar issues with unexpected shutdowns or failures (especially after increasing resources) have been linked to underlying resource leaks, thread exhaustion, or other systemic issues in Airbyte deployments. For example, in one case, a resource leak in the worker led to the need for periodic restarts, and the root cause was traced to log handling and thread management issues [Resource leak in airbyte-worker](https://discuss.airbyte.io/t/2309). - If you are still seeing 502/524 errors and now also see the application shutting down, it could indicate that the underlying problem is not just resource allocation, but possibly a bug, a resource leak, or an external process (like Kubernetes or your orchestrator) terminating the pod due to health checks, liveness/readiness probe failures, or other reasons. What to do next: 1. Check for OOM or Pod Eviction Events: Review your Kubernetes events (kubectl describe pod <pod-name>) to see if the pod is being killed due to out-of-memory (OOM) or other resource-related issues. 2. Review Full Logs: Look for any error or exception messages before the shutdown log entry. The root cause is often logged earlier. 3. Check for Resource Leaks or Thread Exhaustion: If you see a very high thread count or memory usage before shutdown, you may be hitting a known resource leak issue. In such cases, enabling the container orchestrator and setting memory limits (so the pod restarts before hitting the issue) has been used as a workaround [Resource leak in airbyte-worker](https://discuss.airbyte.io/t/2309). 4. Monitor Liveness/Readiness Probes: If your orchestrator is restarting the pod due to failed health checks, you may need to adjust probe settings or investigate why the service is becoming unresponsive. Summary: The log shows a clean shutdown but does not reveal the root cause. The knowledge sources do not provide a direct answer for this specific log, but suggest investigating resource leaks, pod evictions, and health check failures as possible causes. If you can provide more detailed logs or error messages preceding the shutdown, it may help pinpoint the issue. If you need further help, please share more context or logs from before the shutdown event.Edgaras Ignatavičius
08/05/2025, 6:44 AM2025-08-05 06:33:57,689 [default-nioEventLoopGroup-1-4] INFO i.a.a.LoggingTrackingClient(track):339 - track. version: 1.7.2, userId: 00000000-0000-0000-0000-000000000000, action: Airbyte_API_Call, metadata: {user_id=00000000-0000-0000-0000-000000000000, endpoint=/api/public/v1/workspaces/{workspaceId}/definitions/sources, operation=POST, status_code=409}
2025-08-05 06:33:57,691 [default-nioEventLoopGroup-1-4] ERROR i.a.c.s.e.p.AbstractThrowableProblemHandler(handle):33 - Throwable Problem Handler caught exception:
io.airbyte.api.problems.throwable.generated.StateConflictProblem: State conflict
at io.airbyte.server.apis.publicapi.errorHandlers.ConfigClientErrorHandler.handleError(ConfigClientErrorHandler.kt:108)
at io.airbyte.server.apis.publicapi.controllers.DefinitionsController.wrap$lambda$24(DefinitionsController.kt:436)
at io.airbyte.server.apis.publicapi.apiTracking.TrackingHelper.callWithTracker(TrackingHelper.kt:109)
at io.airbyte.server.apis.publicapi.controllers.DefinitionsController.wrap(DefinitionsController.kt:431)
at io.airbyte.server.apis.publicapi.controllers.DefinitionsController.publicCreateSourceDefinition(DefinitionsController.kt:87)
at io.airbyte.server.apis.publicapi.controllers.$DefinitionsController$Definition$Exec.dispatch(Unknown Source)
at io.micronaut.context.AbstractExecutableMethodsDefinition$DispatchedExecutableMethod.invokeUnsafe(AbstractExecutableMethodsDefinition.java:461)
at io.micronaut.context.DefaultBeanContext$BeanContextUnsafeExecutionHandle.invokeUnsafe(DefaultBeanContext.java:4419)
at io.micronaut.web.router.AbstractRouteMatch.execute(AbstractRouteMatch.java:272)
at io.micronaut.web.router.DefaultUriRouteMatch.execute(DefaultUriRouteMatch.java:38)
at io.micronaut.http.server.RouteExecutor.executeRouteAndConvertBody(RouteExecutor.java:493)
at io.micronaut.http.server.RouteExecutor.callRoute(RouteExecutor.java:483)
at io.micronaut.http.server.RequestLifecycle.callRoute(RequestLifecycle.java:187)
at io.micronaut.http.server.RequestLifecycle.executeRoute(RequestLifecycle.java:175)
at io.micronaut.http.server.RequestLifecycle$2.provideResponse(RequestLifecycle.java:395)
at io.micronaut.http.filter.FilterRunner.provideResponseAndHandleErrors(FilterRunner.java:372)
at io.micronaut.http.filter.FilterRunner.filterRequest(FilterRunner.java:307)
at io.micronaut.http.filter.FilterRunner.lambda$filterRequest$2(FilterRunner.java:280)
at io.micronaut.http.filter.AroundLegacyFilter$FilterChainImpl.proceed(AroundLegacyFilter.java:122)
at io.airbyte.micronaut.WebappFilter.doFilter(WebappFilter.kt:49)
at io.micronaut.http.filter.HttpServerFilter.doFilter(HttpServerFilter.java:48)
at io.micronaut.http.filter.AroundLegacyFilter.processRequestFilter(AroundLegacyFilter.java:75)
at io.micronaut.http.filter.FilterRunner.filterRequest(FilterRunner.java:276)
at io.micronaut.http.filter.FilterRunner.run(FilterRunner.java:247)
at io.micronaut.http.server.RequestLifecycle.runServerFilters(RequestLifecycle.java:427)
at io.micronaut.http.server.RequestLifecycle.normalFlow(RequestLifecycle.java:165)
at io.micronaut.http.server.netty.NettyRequestLifecycle.handleNormal(NettyRequestLifecycle.java:93)
at io.micronaut.http.server.netty.RoutingInBoundHandler.accept(RoutingInBoundHandler.java:203)
at io.micronaut.http.server.netty.websocket.NettyServerWebSocketUpgradeHandler.accept(NettyServerWebSocketUpgradeHandler.java:156)
at io.micronaut.http.server.netty.handler.PipeliningServerHandler$MessageInboundHandler.read(PipeliningServerHandler.java:391)
at io.micronaut.http.server.netty.handler.PipeliningServerHandler.channelRead(PipeliningServerHandler.java:221)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93)
at io.netty.handler.codec.http.websocketx.extensions.WebSocketServerExtensionHandler.onHttpRequestChannelRead(WebSocketServerExtensionHandler.java:158)
at io.netty.handler.codec.http.websocketx.extensions.WebSocketServerExtensionHandler.channelRead(WebSocketServerExtensionHandler.java:85)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.airbyte.commons.server.support.AuthorizationServerHandler.channelRead(AuthorizationServerHandler.java:59)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:324)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:289)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.airbyte.commons.server.support.AuthorizationServerHandler.channelRead(AuthorizationServerHandler.java:59)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:107)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1357)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:868)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:796)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:732)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:658)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:998)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:1583)kapa.ai
08/05/2025, 6:44 AMkapa.ai
08/05/2025, 6:44 AMendpoint=/api/public/v1/workspaces/{workspaceId}/definitions/sources, operation=POST, status_code=409 ... io.airbyte.api.problems.throwable.generated.StateConflictProblem: State conflict This indicates that when Terraform tries to create multiple source_definitions at the same time, Airbyte returns a 409 Conflict error with a "State conflict" message. This is not a resource or timeout issue, but rather a concurrency or idempotency issue in the Airbyte API. What does this mean? - The Airbyte API is not designed to handle concurrent creation of the same or conflicting source definitions. When two or more requests try to create the same resource at the same time, a state conflict occurs, resulting in a 409 error. - This is a known limitation and has been discussed in the Airbyte community. There is a feature request for idempotent APIs or unique resource names to avoid such conflicts, but as of now, the API does not support this natively ([Idempotent APIs for creating Airbyte resources](https://github.com/airbytehq/airbyte/issues/19415)). How to solve this: - Avoid concurrent creation: Ensure that your Terraform configuration or workflow does not attempt to create multiple airbyte_source_definition resources at the exact same time. You can do this by: - Adding explicit depends_on relationships in Terraform to serialize resource creation. - Running terraform apply with fewer parallel operations (e.g., terraform apply -parallelism=1). - Retry logic: If you must create resources in parallel, implement retry logic for 409 errors, but the best practice is to avoid parallel creation of source definitions. Summary: The 409 "State conflict" error is due to concurrent API calls to create source definitions, which Airbyte does not support. Serialize your resource creation in Terraform to avoid this issue. This is a known limitation and not a resource or timeout problem ([Idempotent APIs for creating Airbyte resources](https://github.com/airbytehq/airbyte/issues/19415)).Edgaras Ignatavičius
08/05/2025, 6:54 AMterraform apply -parallelism=1 it gave me error:
2025-08-05 06:50:39,561 [io-executor-thread-4] ERROR i.a.c.s.e.h.UncaughtExceptionHandler(handle):33 - Uncaught exception
io.temporal.client.WorkflowNotFoundException: workflowId='spec_4952a126-29dd-4681-8834-114599c30d30', runId='', workflowType='ConnectorCommandWorkflow'
at io.temporal.client.WorkflowStubImpl.throwAsWorkflowFailureException(WorkflowStubImpl.java:596)
at io.temporal.client.WorkflowStubImpl.signal(WorkflowStubImpl.java:94)
at io.temporal.client.WorkflowInvocationHandler$SyncWorkflowInvocationHandler.signalWorkflow(WorkflowInvocationHandler.java:312)
at io.temporal.client.WorkflowInvocationHandler$SyncWorkflowInvocationHandler.invoke(WorkflowInvocationHandler.java:287)
at io.temporal.client.WorkflowInvocationHandler.invoke(WorkflowInvocationHandler.java:191)
at jdk.proxy2/jdk.proxy2.$Proxy50.checkTerminalStatus(Unknown Source)
at io.airbyte.commons.server.handlers.SignalHandler.signalConnectorCommand(SignalHandler.kt:27)
at io.airbyte.commons.server.handlers.SignalHandler.signal(SignalHandler.kt:20)
at io.airbyte.server.apis.controllers.SignalApiController.signal$lambda$0(SignalApiController.kt:37)
at io.airbyte.server.apis.ApiHelper.execute(ApiHelper.kt:32)
at io.airbyte.server.apis.controllers.SignalApiController.signal(SignalApiController.kt:31)
at io.airbyte.server.apis.controllers.$SignalApiController$Definition$Exec.dispatch(Unknown Source)
at io.micronaut.context.AbstractExecutableMethodsDefinition$DispatchedExecutableMethod.invokeUnsafe(AbstractExecutableMethodsDefinition.java:461)
at io.micronaut.context.DefaultBeanContext$BeanContextUnsafeExecutionHandle.invokeUnsafe(DefaultBeanContext.java:4419)
at io.micronaut.web.router.AbstractRouteMatch.execute(AbstractRouteMatch.java:272)
at io.micronaut.web.router.DefaultUriRouteMatch.execute(DefaultUriRouteMatch.java:38)
at io.micronaut.http.server.RouteExecutor.executeRouteAndConvertBody(RouteExecutor.java:493)
at io.micronaut.http.server.RouteExecutor.lambda$callRoute$5(RouteExecutor.java:470)
at io.micronaut.core.execution.ExecutionFlow.lambda$async$0(ExecutionFlow.java:92)
at io.micronaut.core.propagation.PropagatedContext.lambda$wrap$3(PropagatedContext.java:211)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: io.grpc.StatusRuntimeException: NOT_FOUND: workflow execution already completed
at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:351)
at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:332)
at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:174)
at io.temporal.api.workflowservice.v1.WorkflowServiceGrpc$WorkflowServiceBlockingStub.signalWorkflowExecution(WorkflowServiceGrpc.java:5821)
at io.temporal.internal.client.external.GenericWorkflowClientImpl.lambda$signal$2(GenericWorkflowClientImpl.java:93)
at io.temporal.internal.retryer.GrpcRetryer.lambda$retry$0(GrpcRetryer.java:52)
at io.temporal.internal.retryer.GrpcSyncRetryer.retry(GrpcSyncRetryer.java:69)
at io.temporal.internal.retryer.GrpcRetryer.retryWithResult(GrpcRetryer.java:60)
at io.temporal.internal.retryer.GrpcRetryer.retry(GrpcRetryer.java:50)
at io.temporal.internal.client.external.GenericWorkflowClientImpl.signal(GenericWorkflowClientImpl.java:88)
at io.temporal.internal.client.RootWorkflowClientInvoker.signal(RootWorkflowClientInvoker.java:140)
at io.temporal.client.WorkflowStubImpl.signal(WorkflowStubImpl.java:90)
... 21 common frames omittedkapa.ai
08/05/2025, 6:54 AMkapa.ai
08/05/2025, 6:55 AMio.temporal.client.WorkflowNotFoundException: workflowId='spec_4952a126-29dd-4681-8834-114599c30d30', runId='', workflowType='ConnectorCommandWorkflow' ... Caused by: io.grpc.StatusRuntimeException: NOT_FOUND: workflow execution already completed indicates that Airbyte attempted to signal a Temporal workflow (ConnectorCommandWorkflow) that no longer exists or has already completed. This is a Temporal-level error, not directly related to Terraform's parallelism or resource allocation. What the knowledge sources say: - This error is seen when Airbyte tries to interact with a workflow that has already finished, either due to a fast failure, timeout, or successful completion before the signal was sent. It is not unique to Terraform or parallelism settings, but can be triggered by timing issues or retries ([example of similar error](https://discuss.airbyte.io/t/3486), [another example](https://github.com/airbytehq/airbyte/issues/32459)). - In the context of API or automation (like Terraform), this can happen if the resource creation process is retried or if there is a race condition between workflow completion and subsequent API calls. What you can do: - Retry the operation: Since this is a transient workflow state issue, simply retrying the Terraform apply may succeed, especially if the error is not consistent. - Check for duplicate or rapid requests: Ensure that your Terraform configuration is not causing duplicate resource creation or rapid retries, which could lead to this state. - Check Airbyte and Temporal logs: Look for any preceding errors or warnings that might indicate why the workflow completed unexpectedly or too quickly. - Airbyte/Temporal bug or limitation: The knowledge sources suggest this is a known class of error in Airbyte/Temporal, especially under automation or high-frequency API usage, but do not provide a definitive fix other than retrying or serializing operations ([see similar discussion](https://discuss.airbyte.io/t/3486), [see also](https://github.com/airbytehq/airbyte/issues/32459)). Summary: This error is due to Airbyte attempting to signal a Temporal workflow that has already completed. It is not directly caused by Terraform's parallelism setting, but rather by workflow timing or state. Retrying the operation or ensuring serialized, non-duplicated resource creation is the recommended approach. The knowledge sources do not provide a more specific solution for this error.