There are some tickets that have error descriptions or comments that suggest that the default queue size of the PayaraExecutorService is _sometimes_ too small.
Issue: #3360 Comment: https://github.com/payara/Payara/issues/3360#issuecomment-444692778
Issue: #3493
Workaround currently would be to configure the PayaraExecutorService to a queue size of 0 (unlimited) or something large like 1000.
Payara starts and deploys consistently.
Depending on the machine performance (slow harddrive, single core processor or high processor load at deployment or startup) the submitted tasks fill up the threadpool queue and may eventually lead to java.util.concurrent.RejectedExecutionException.
Startup or deploy on a _slow_ machine. This can involve:
Please see the mentioned tickets above.
Server startup or application deployment.
The queue size can be fixed using the asadmin command
asadmin set-payara-executor-service-configuration --threadpoolexecutorqueuesize 1000
This is a known issue with ID PAYARA-3328
@smillidge Maybe besides increasing queue default size the RejectExecutionHandler could also by default be set to https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ThreadPoolExecutor.CallerRunsPolicy.html
This would prevent these Exceptions even in case a bigger queue gets filled.
Yeah will do. Weird thing is noone saw this in dev or testing even with huge ear files. (sigh)
Maybe tests on a machine with limited resources for IO and cores could help?
The queue size can be fixed using the asadmin command
asadmin set-payara-executor-service-configuration --threadpoolexecutorqueuesize 1000This is a known issue with ID PAYARA-3328
Is there a way to apply this with Payara micro on the commandline? Or would we need to use the domaindir approach?
I'm trying to figure out if it's worth it to use 5.184 with workarounds or just use 5.183.
Just an addition for others - I hit the same problem on payara start after upgrading to 5.184. As the app server instance wouldn't start I was unable to run asadmin set-payara-executor-service-configuration --threadpoolexecutorqueuesize 1000.
However I was able to edit domain,xml file with
<config name="server-config">
...
<payara-executor-service-configuration thread-pool-executor-queue-size="1000"></payara-executor-service-configuration>
and successfully start.
Most helpful comment
The queue size can be fixed using the asadmin command
asadmin set-payara-executor-service-configuration --threadpoolexecutorqueuesize 1000This is a known issue with ID PAYARA-3328