Job openapi: Failed to start thread "Unknown thread"

26 views
Skip to first unread message

Patrick Pugh

unread,
Nov 18, 2025, 11:33:55 AM (11 days ago) Nov 18
to ZAP User Group
Hello,

I'm running into memory problems with the openapi jobs. I have several openapi jobs, one for each of the different api our webapp uses. I'm using the automation framework with Docker.

Example:
Job openapi started
Job openapi added 6 URLs
Job openapi finished, time taken: 00:00:03
Job openapi started
[2118.331s][warning][os,thread] Failed to start thread "Unknown thread" - pthread_create failed (EAGAIN) for attributes: stacksize: 1024k, guardsize: 0k, detached.
[2118.332s][warning][os,thread] Failed to start the native thread for java.lang.Thread "JdkHttpClient-8468-2"
[2118.464s][warning][os,thread] Failed to start thread "Unknown thread" - pthread_create failed (EAGAIN) for attributes: stacksize: 1024k, guardsize: 0k, detached.
[2118.466s][warning][os,thread] Failed to start the native thread for java.lang.Thread "ForkJoinPool.commonPool-worker-3"
[2118.737s][warning][os,thread] Failed to start thread "Unknown thread" - pthread_create failed (EAGAIN) for attributes: stacksize: 1024k, guardsize: 0k, detached.
[2118.738s][warning][os,thread] Failed to start the native thread for java.lang.Thread "JdkHttpClient-8469-2"
[2118.739s][warning][os,thread] Failed to start thread "Unknown thread" - pthread_create failed (EAGAIN) for attributes: stacksize: 1024k, guardsize: 0k, detached.
[2118.740s][warning][os,thread] Failed to start the native thread for java.lang.Thread "ForkJoinPool.commonPool-worker-4"
[2118.740s][warning][os,thread] Failed to start thread "Unknown thread" - pthread_create failed (EAGAIN) for attributes: stacksize: 1024k, guardsize: 0k, detached.
[2118.741s][warning][os,thread] Failed to start the native thread for java.lang.Thread "JdkHttpClient-8469-3"
[2118.824s][warning][os,thread] Failed to start thread "Unknown thread" - pthread_create failed (EAGAIN) for attributes: stacksize: 1024k, guardsize: 0k, detached.
[2118.825s][warning][os,thread] Failed to start the native thread for java.lang.Thread "JdkHttpClient-8470-1"
[2118.826s][warning][os,thread] Failed to start thread "Unknown thread" - pthread_create failed (EAGAIN) for attributes: stacksize: 1024k, guardsize: 0k, detached.
[2118.827s][warning][os,thread] Failed to start the native thread for java.lang.Thread "ForkJoinPool.commonPool-worker-5"

After this, zap exits with a return code of 1.

Are there options or command line arguments that could help me resolve this issue?

Thanks!





Simon Bennetts

unread,
Nov 27, 2025, 9:55:29 AM (3 days ago) Nov 27
to ZAP User Group
Hiya,

That doesnt look good :/
You could have a look in the zap.log which will might give more details: https://www.zaproxy.org/faq/somethings-not-working-what-should-i-do/#check-the-log-file

But in general, ZAP will struggle if it does not have enough memory.
Can you increase the amount of memory available to ZAP?
Or can you split the current plan into multiple plans, each of which targets a different API?

Cheers,

Simon

Patrick Pugh

unread,
Nov 28, 2025, 2:57:27 PM (yesterday) Nov 28
to ZAP User Group
Hello, thank you for your reply.  The log ends with this:

2025-11-28 19:10:13,534 [main ] INFO  CommandLineBootstrap - ZAP 2.16.1 terminated.
2025-11-28 19:10:13,534 [main ] ERROR UncaughtExceptionLogger - Exception in thread "main"
java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached

This is running on an agent with 8g of memory.  I have successfully completed the same job in the same docker image on my development computer, which has 32g and it looks like the image used up to 15g. I think assigning more resources to the agent might be our only option then.
Reply all
Reply to author
Forward
0 new messages