{"id":732,"date":"2016-06-08T09:47:31","date_gmt":"2016-06-08T04:17:31","guid":{"rendered":"http:\/\/www.middlewareprimer.com\/blog\/?p=732"},"modified":"2016-06-08T09:47:31","modified_gmt":"2016-06-08T04:17:31","slug":"resource-shortage-mq-v7-5","status":"publish","type":"post","link":"http:\/\/www.middlewareprimer.com\/blog\/2016\/06\/08\/resource-shortage-mq-v7-5\/","title":{"rendered":"Resource shortage in MQ V7.5"},"content":{"rendered":"<p>Resource shortage in MQ V7.5 Queue manager in Linux RHEL 6.5 when running large number of clients. Linux machine running with Message queues gets hung and the user that is running the mqm process shows a message frequently &#8220;-bash: fork: retry: Resource temporarily unavailable&#8221;.<\/p>\n<p>MQ FDC logs will show below message.<\/p>\n<p>| Probe Description :- AMQ6119: An internal WebSphere MQ error has<br \/>\noccurred<br \/>\n| (&#8217;11 &#8211; Resource temporarily unavailable&#8217; from pthread_create.)<br \/>\n| Arith1 :- 11 (0xb)<br \/>\n| Comment1 :- &#8217;11 &#8211; Resource temporarily unavailable&#8217; from<br \/>\n| pthread_create.<br \/>\n.<br \/>\nAnd it might be followed by:<br \/>\n| Probe Id :- ZS401010<br \/>\n| Component :- zstStartAsyncConsumeThread<br \/>\n| Major Errorcode :- xecP_E_PROC_LIMIT<br \/>\n| Probe Description :- AMQ6026: A resource shortage prevented the creation of a WebSphere MQ process.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Resolution<\/strong><\/span><\/p>\n<p>One of the common troubleshooting point here is to check what is the exact reason in the FDC log file and also based on the reason code proceed with the solution. In my case Kernel level settings were not properly defined and this was the problem here.<\/p>\n<p>As mentioned in the T<a href=\"http:\/\/www-01.ibm.com\/support\/docview.wss?uid=swg21588655\" target=\"_blank\"><span style=\"text-decoration: underline;\">echnote<\/span><\/a> and also in my earlier <a href=\"http:\/\/www.middlewareprimer.com\/blog\/2016\/06\/07\/websphere-mq-linux-system-settings\/\" target=\"_blank\"><span style=\"text-decoration: underline;\">Blog entry<\/span><\/a>, please update Linux Kernal level settings accordingly and the issue will get resolved.<\/p>\n<p>As mentioned in infocenter,<\/p>\n<p>The minimum configuration for WebSphere MQ for these resources is as follows:<br \/>\nkernel.msgmni = 1024<br \/>\nkernel.shmmni = 4096<br \/>\nkernel.shmall = 2097152<br \/>\nkernel.shmmax = 268435456<br \/>\nkernel.sem = 500 256000 250 1024<br \/>\nfs.file-max = 524288<br \/>\nnet.ipv4.tcp_keepalive_time = 300<\/p>\n<p>&nbsp;<\/p>\n<p>In addition to the above, there are some other kernel parameters that might be useful, but they are not documented in the Infocenter, such as:<\/p>\n<p><strong>a) kernel.pid_max<\/strong><\/p>\n<p>By default the Linux kernel has a maximum process identifier, which may also be used with threads and may limit the allowed number of threads. This parameter is mentioned in the following technical documents. The value used was the same in both documents:<br \/>\n<strong> kernel.pid_max = 120000<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>b) kernel.threads-max<\/strong><\/p>\n<p>According to the Linux manual page, the Operating System reports when the system lacks the necessary resources to create another thread, or the system-imposed limit on the total number of threads in a process {PTHREAD_THREADS_MAX} would be exceeded. If the value of kernel.threads-max is low, increase its value. The command &#8220;cat \/proc\/sys\/kernel\/threads-max&#8221; displays the current value.<\/p>\n<p>The number of threads created by MQ depends on number of application connecting to the queue manager. MQ creates one thread for each local connection (in amqzlaa0) or two threads (one in amqzlaa0 and the other one in amqrmppa) for each client connection. If there are 100 connections active to the queue manager, then the queue manager may need about 200 (amqzlla0 and amqrmppa) + approximately 100 threads (for other MQ processes).<\/p>\n<p>In Linux, the number of active threads can be calculated from the output of the command: ps -elfL<br \/>\nThe value used is: <strong>kernel.threads-max = 48000<\/strong><\/p>\n<p>In my case I have used the same value for both a and b as 120000.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Resource shortage in MQ V7.5 Queue manager in Linux RHEL 6.5 when running large number of clients. Linux machine running with Message queues gets hung and the user that is running the mqm process shows a message frequently &#8220;-bash: fork: retry: Resource temporarily unavailable&#8221;. MQ FDC logs will show below message. | Probe Description :- [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[204],"tags":[205],"class_list":["post-732","post","type-post","status-publish","format-standard","hentry","category-websphere-mq","tag-mq-7-5"],"_links":{"self":[{"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/posts\/732","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/comments?post=732"}],"version-history":[{"count":2,"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/posts\/732\/revisions"}],"predecessor-version":[{"id":741,"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/posts\/732\/revisions\/741"}],"wp:attachment":[{"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/media?parent=732"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/categories?post=732"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.middlewareprimer.com\/blog\/wp-json\/wp\/v2\/tags?post=732"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}