Greenplum - Out of memory - greenplum

When trying to query from gpdb cluster. getting Out of memory error with error code 53400.
System Related information
TOTAL RAM =30G
SWAP =15G
gp_vmem_protect_limit=8192MB
TOTAL segment = 8 Primary, 8 mirror = 16
SEGMENT HOST=2
Getting error :
ERROR: Out of memory (seg2 slice109 datanode01:40002 pid=21691)
SQL state: 53400
Detail: VM protect failed to allocate 8388608 bytes from system, VM Protect 4161 MB available
We tried
gpconfig -c gp_vmem_protect_limit -v 4114
vm.overcommit_ratio = 95
Then, getting this error. P
ERROR: XX000: Canceling query because of high VMEM usage. Used: 3704MB, available 410MB, red zone: 3702MB
Also , getting this symptom
Prod=# show runaway_detector_activation_percent;
runaway_detector_activation_percent
-------------------------------------
90
(1 row)
Please suggest what could be the setting in this case.
Also, What is the root cause of OOM error?
Any help on it would be much appreciated?

Related

Getting issue when install composer Laravel 7 Image Intervention

I want to install Laravel 7 Image Intervention using following command
composer require intervention/image
but while installing i am getting three errors belows
1) PHP Fatal error: Allowed memory size of 1610612736 bytes
exhausted (tried to allocate 4096 bytes)
phar://C:/xampp/htdocs/magento2/composer.phar/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
2)Check
https://getcomposer.org/doc/articles/troubleshooting.md#memory-
limit-errors for more info on how to handle out of memory errors.
3)Fatal error: Allowed memory size of 1610612736 bytes exhausted
(tried to allocate 4096 bytes) in phar://C:/xampp/htdocs/magento2/composer.phar/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
I dont know why this happen? If anyone have idea then please let me know.
Please help me in this
try put memory_limit = -1
at php.ini on your local server

elastic dump fail with java script out pf memory

used this commands
elasticdump --input=/opt/index_5.json --output=http://esserver:9200/index_5 --limit=5000 --transform="doc._source=Object.assign({},doc)"
Error like below while importing the data
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x3b9faf49e6e9
1: stringSlice(aka stringSlice) [0x8c113e13429] [buffer.js:~589] [pc=0x3cfe067fcdcf](this=0x34873cd026f1 ,buf=0x15dd55450ef1 ,encoding=0x3b9faf4bdd31 ,start=0,end=8)
2: write [0x2bf9d6645199] [/usr/lib/node_modules/elasticdump/node_modules/jsonparse/jsonparse.js:~127] [pc=0x3cfe06d95bbd](th...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x8fa0c0 node::Abort() [node]
2: 0x8fa10c [node]
Aborted
In my case downgrading to elasticsearch 6.10 solved a similar memory issue. See https://github.com/taskrabbit/elasticsearch-dump/issues/628
I think that root cause of this out of memory is to use by you limit parameter with huge number value 5000 --limit=5000 (default id 100). Sometime default is too much and I see the same issue then I just change this value to --limit=10 for example.

H2O cluster startup frequently timing out

Trying to start an h2o cluster on (MapR) hadoop via python
# startup hadoop h2o cluster
import os
import subprocess
import h2o
import shlex
import re
from Queue import Queue, Empty
from threading import Thread
def enqueue_output(out, queue):
"""
Function for communicating streaming text lines from seperate thread.
see https://stackoverflow.com/questions/375427/non-blocking-read-on-a-subprocess-pipe-in-python
"""
for line in iter(out.readline, b''):
queue.put(line)
out.close()
# clear legacy temp. dir.
hdfs_legacy_dir = '/mapr/clustername/user/mapr/hdfsOutputDir'
if os.path.isdir(hdfs_legacy_dir ):
print subprocess.check_output(shlex.split('rm -r %s'%hdfs_legacy_dir ))
# start h2o service in background thread
local_h2o_start_path = '/home/mapr/h2o-3.18.0.2-mapr5.2/'
startup_p = subprocess.Popen(shlex.split('/bin/hadoop jar {}h2odriver.jar -nodes 4 -mapperXmx 6g -timeout 300 -output hdfsOutputDir'.format(local_h2o_start_path)),
shell=False,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# setup message passing queue
q = Queue()
t = Thread(target=enqueue_output, args=(startup_p.stdout, q))
t.daemon = True # thread dies with the program
t.start()
# read line without blocking
h2o_url_out = ''
while True:
try: line = q.get_nowait() # or q.get(timeout=.1)
except Empty:
continue
else: # got line
print line
# check for first instance connection url output
if re.search('Open H2O Flow in your web browser', line) is not None:
h2o_url_out = line
break
if re.search('Error', line) is not None:
print 'Error generated: %s' % line
sys.exit()
print 'Connection url output line: %s' % h2o_url_out
h2o_cnxn_ip = re.search('(?<=Open H2O Flow in your web browser: http:\/\/)(.*?)(?=:)', h2o_url_out).group(1)
print 'H2O connection ip: %s' % h2o_cnxn_ip
frequently throws a timeout error
Waiting for H2O cluster to come up...
H2O node 172.18.4.66:54321 requested flatfile
H2O node 172.18.4.65:54321 requested flatfile
H2O node 172.18.4.67:54321 requested flatfile
ERROR: Timed out waiting for H2O cluster to come up (300 seconds)
Error generated: ERROR: Timed out waiting for H2O cluster to come up (300 seconds)
Shutting down h2o cluster
Looking at the docs (http://docs.h2o.ai/h2o/latest-stable/h2o-docs/faq/general-troubleshooting.html) (and just doing a wordfind for the word "timeout"), was unable to find anything that helped the problem (eg. extending the timeout time via hadoop jar h2odriver.jar -timeout <some time> did nothing but extend the time until the timeout error popped up).
Have noticed that this happens often when there is another instance of an h2o cluster already up and running (which I don't understand since I would think that YARN could support multiple instances), yet also sometimes when there is no other cluster initialized.
Anyone know anything else that can be tried to solve this problem or get more debugging info beyond the error message being thrown by h2o?
UPDATE:
Trying to recreate the problem from the commandline, getting
[me#mnode01 project]$ /bin/hadoop jar /home/me/h2o-3.20.0.5-mapr5.2/h2odriver.jar -nodes 4 -mapperXmx 6g -timeout 300 -output hdfsOutputDir
Determining driver host interface for mapper->driver callback...
[Possible callback IP address: 172.18.4.62]
[Possible callback IP address: 127.0.0.1]
Using mapper->driver callback IP address and port: 172.18.4.62:29388
(You can override these with -driverif and -driverport/-driverportrange.)
Memory Settings:
mapreduce.map.java.opts: -Xms6g -Xmx6g -XX:PermSize=256m -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Dlog4j.defaultInitOverride=true
Extra memory percent: 10
mapreduce.map.memory.mb: 6758
18/08/15 09:18:46 INFO client.MapRZKBasedRMFailoverProxyProvider: Updated RM address to mnode03.cluster.local/172.18.4.64:8032
18/08/15 09:18:48 INFO mapreduce.JobSubmitter: number of splits:4
18/08/15 09:18:48 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1523404089784_7404
18/08/15 09:18:48 INFO security.ExternalTokenManagerFactory: Initialized external token manager class - com.mapr.hadoop.yarn.security.MapRTicketManager
18/08/15 09:18:48 INFO impl.YarnClientImpl: Submitted application application_1523404089784_7404
18/08/15 09:18:48 INFO mapreduce.Job: The url to track the job: https://mnode03.cluster.local:8090/proxy/application_1523404089784_7404/
Job name 'H2O_66888' submitted
JobTracker job ID is 'job_1523404089784_7404'
For YARN users, logs command is 'yarn logs -applicationId application_1523404089784_7404'
Waiting for H2O cluster to come up...
H2O node 172.18.4.65:54321 requested flatfile
H2O node 172.18.4.67:54321 requested flatfile
H2O node 172.18.4.66:54321 requested flatfile
ERROR: Timed out waiting for H2O cluster to come up (300 seconds)
ERROR: (Try specifying the -timeout option to increase the waiting time limit)
Attempting to clean up hadoop job...
Killed.
18/08/15 09:23:54 INFO client.MapRZKBasedRMFailoverProxyProvider: Updated RM address to mnode03.cluster.local/172.18.4.64:8032
----- YARN cluster metrics -----
Number of YARN worker nodes: 6
----- Nodes -----
Node: http://mnode03.cluster.local:8044 Rack: /default-rack, RUNNING, 0 containers used, 0.0 / 7.0 GB used, 0 / 2 vcores used
Node: http://mnode05.cluster.local:8044 Rack: /default-rack, RUNNING, 0 containers used, 0.0 / 10.4 GB used, 0 / 2 vcores used
Node: http://mnode06.cluster.local:8044 Rack: /default-rack, RUNNING, 0 containers used, 0.0 / 10.4 GB used, 0 / 2 vcores used
Node: http://mnode01.cluster.local:8044 Rack: /default-rack, RUNNING, 0 containers used, 0.0 / 5.0 GB used, 0 / 2 vcores used
Node: http://mnode04.cluster.local:8044 Rack: /default-rack, RUNNING, 1 containers used, 7.0 / 10.4 GB used, 1 / 2 vcores used
Node: http://mnode02.cluster.local:8044 Rack: /default-rack, RUNNING, 1 containers used, 2.0 / 8.7 GB used, 1 / 2 vcores used
----- Queues -----
Queue name: root.default
Queue state: RUNNING
Current capacity: 0.00
Capacity: 0.00
Maximum capacity: -1.00
Application count: 0
Queue 'root.default' approximate utilization: 0.0 / 0.0 GB used, 0 / 0 vcores used
----------------------------------------------------------------------
WARNING: Job memory request (26.4 GB) exceeds queue available memory capacity (0.0 GB)
WARNING: Job virtual cores request (4) exceeds queue available virtual cores capacity (0)
ERROR: Only 3 out of the requested 4 worker containers were started due to YARN cluster resource limitations
----------------------------------------------------------------------
For YARN users, logs command is 'yarn logs -applicationId application_1523404089784_7404'
and noticing the later outputs
WARNING: Job memory request (26.4 GB) exceeds queue available memory capacity (0.0 GB)
WARNING: Job virtual cores request (4) exceeds queue available virtual cores capacity (0)
ERROR: Only 3 out of the requested 4 worker containers were started due to YARN cluster
I am confused by the reported 0GB mem. and 0 vcores becuase there are no other applications running on the cluster and looking at the cluster details in the YARN RM web UI shows
(using image, since could not find unified place in log files for this info and why the mem. availability is so uneven despite having no other running applications, I do not know). At this point, should mention that don't have much experience tinkering with / examining YARN configs, so it's difficult for me to find relevant information at this point.
Could it be that I am starting h2o cluster with -mapperXmx=6g, but (as shown in the image) one of the nodes only has 5g mem. available, so if this node is randomly selected to contribute to the initialized h2o application, it does not have enough memory to support the requested mapper mem.? Changing the startup command to /bin/hadoop jar /home/me/h2o-3.20.0.5-mapr5.2/h2odriver.jar -nodes 4 -mapperXmx 5g -timeout 300 -output hdfsOutputDir and start/stopping multiple times without error seems to support this theory (though need to check further to determine if I'm interpreting things correctly).
This is most likely because your Hadoop cluster is busy, and there just isn't space to start new yarn containers.
If you ask for N nodes, then you either get all N nodes, or the launch process times out like you are seeing. You can optionally use the -timeout command line flag to increase the timeout.

Redis OOM trying to force error

We were getting the error:
OOM command not allowed when used memory > 'maxmemory
and now I am trying to rebuild the error on my local system, but sadly failing :|
redis-cli info gives me this:
maxmemory_human:10.00M
maxmemory_policy:noeviction
and I am forcing the cache to be overflooded - but it always stays around 10MB
used_memory_human:10.01M
What do I do wrong?

Getting Allowed memory size error on sample data deployment magento2

I am trying to install sample data using magento 2 command line utility. But getting blow error when in run "php magento sampledata:deploy" from php command line.
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8388608 bytes) in sionParser.php on line 230
Anyone faced similar error? please suggest me how to resolve it.
You can do this using command,
php -dmemory_limit=6G bin/magento setup:static-content:deploy
where 6G you can change it.
I have same problems. Its working fine now.
Unfortunately, the official Magento 2 documentation does not state in clearly, but you need at least 768 megabytes of RAM per a Magento 2 PHP process:
http://devdocs.magento.com/guides/v2.0/install-gde/prereq/php-ubuntu.html#instgde-prereq-timezone
http://devdocs.magento.com/guides/v2.0/install-gde/prereq/php-centos.html#instgde-prereq-timezone
https://github.com/magento/magento2/blob/2.0.0/.htaccess#L40

Resources