> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Unable to create native thread

> Resolve the error returned when the operating system refuses to start a new thread on your Maia runner.

## Error message

```text wrap theme={null}
java.lang.OutOfMemoryError: unable to create native thread
```

This error can appear when using any component.

### Explanation

The Maia runner tried to start a new thread and the operating system refused. This usually means too many tasks or threads are running at once on one instance.

### Potential causes

* Too many pipelines or loop iterations are running in parallel on one Maia runner.
* A container or host limit on threads or processes is lower than the workload needs.

***

## Resolve the error

1. Reduce the number of pipelines and parallel loop iterations running at the same time on the Maia runner.
2. Raise the process or thread limit (`pids-limit` or `ulimit -u`) on the container or host, if it's set low.
3. [Add instances](https://docs.maia.ai/docs/guides/scaling-best-practices.md#horizontal-scaling) so concurrent work is spread out.
4. Re-run the pipeline.
5. If you still need help, [contact Maia Support](https://support.matillion.com/s/) and include the items listed below.

   * The full error text.
   * The root pipeline execution ID.
   * The Maia runner ID and the time of failure (UTC).

### Prevent future errors

To prevent this error occurring again, set a concurrency cap for each Maia runner based on its size.


## Related topics

- [Maia runner ran out of memory](https://docs.maia.ai/docs/errors/maia-runner-ran-out-of-memory.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.