{"action":"created","issue":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5633","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5633/labels{/name}","comments_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5633/comments","events_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5633/events","html_url":"https://github.com/orientechnologies/orientdb/issues/5633","id":128401694,"number":5633,"title":"Server throws OOM and crashes on heavy load","user":{"login":"Ashendra","id":2150598,"avatar_url":"https://avatars.githubusercontent.com/u/2150598?v=3","gravatar_id":"","url":"https://api.github.com/users/Ashendra","html_url":"https://github.com/Ashendra","followers_url":"https://api.github.com/users/Ashendra/followers","following_url":"https://api.github.com/users/Ashendra/following{/other_user}","gists_url":"https://api.github.com/users/Ashendra/gists{/gist_id}","starred_url":"https://api.github.com/users/Ashendra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ashendra/subscriptions","organizations_url":"https://api.github.com/users/Ashendra/orgs","repos_url":"https://api.github.com/users/Ashendra/repos","events_url":"https://api.github.com/users/Ashendra/events{/privacy}","received_events_url":"https://api.github.com/users/Ashendra/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/orientechnologies/orientdb/labels/bug","name":"bug","color":"ededed"},{"url":"https://api.github.com/repos/orientechnologies/orientdb/labels/waiting%20reply","name":"waiting reply","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"laa","id":105066,"avatar_url":"https://avatars.githubusercontent.com/u/105066?v=3","gravatar_id":"","url":"https://api.github.com/users/laa","html_url":"https://github.com/laa","followers_url":"https://api.github.com/users/laa/followers","following_url":"https://api.github.com/users/laa/following{/other_user}","gists_url":"https://api.github.com/users/laa/gists{/gist_id}","starred_url":"https://api.github.com/users/laa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laa/subscriptions","organizations_url":"https://api.github.com/users/laa/orgs","repos_url":"https://api.github.com/users/laa/repos","events_url":"https://api.github.com/users/laa/events{/privacy}","received_events_url":"https://api.github.com/users/laa/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/orientechnologies/orientdb/milestones/75","html_url":"https://github.com/orientechnologies/orientdb/milestones/2.1.10","labels_url":"https://api.github.com/repos/orientechnologies/orientdb/milestones/75/labels","id":1522868,"number":75,"title":"2.1.10","description":"","creator":{"login":"robfrank","id":413587,"avatar_url":"https://avatars.githubusercontent.com/u/413587?v=3","gravatar_id":"","url":"https://api.github.com/users/robfrank","html_url":"https://github.com/robfrank","followers_url":"https://api.github.com/users/robfrank/followers","following_url":"https://api.github.com/users/robfrank/following{/other_user}","gists_url":"https://api.github.com/users/robfrank/gists{/gist_id}","starred_url":"https://api.github.com/users/robfrank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robfrank/subscriptions","organizations_url":"https://api.github.com/users/robfrank/orgs","repos_url":"https://api.github.com/users/robfrank/repos","events_url":"https://api.github.com/users/robfrank/events{/privacy}","received_events_url":"https://api.github.com/users/robfrank/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":5,"state":"open","created_at":"2016-01-20T14:53:31Z","updated_at":"2016-01-25T15:25:01Z","due_on":"2016-01-20T06:00:00Z","closed_at":null},"comments":5,"created_at":"2016-01-24T14:49:14Z","updated_at":"2016-01-25T19:08:59Z","closed_at":null,"body":"I'm running orientdb standalone server on a machine with 64gb ram and 4g swap space. Database has more than 300 millions edges and around 70 million vertices.\r\nI'm running the server with following jvm options\r\n-XX:+UseG1GC -Xmx8g -Djna.nosys=true -XX:+HeapDumpOnOutOfMemoryError  \r\n-Dstorage.diskCache.bufferSize=30480\r\n-Denvironment.dumpCfgAtStartup=true -Dindex.embeddedToSbtreeBonsaiThreshold=-1 \r\n-Dnetwork.maxConcurrentSessions=10000\r\n\r\nI am connecting remotely to the server using java apis. For creating connections using the OrientGraphFactory with min and max pool size as 100 and 200.\r\nEach client performs insert/read/delete at around 10k qps(all combined). I have multiple such clients connecting to the server. \r\n\r\nWhen qps is over 50k, the orientdb server crashes with Out of Memory(OOM) exception. Sample error\r\n\r\nThere is insufficient memory for the Java Runtime Environment to continue.\r\n# Native memory allocation (mmap) failed to map 12288 bytes for committing reserved memory.\r\n\r\nThough there is enough ram available during the time of crash.\r\nMemory: 4k page, physical 66064704k(262280k free), swap 4194300k(4162808k free)\r\n\r\nPlease suggest how to fix this problem.\r\n\r\nAttaching the heap dump files created after each crash. \r\n\r\n[hs_err_pid597.txt](https://github.com/orientechnologies/orientdb/files/102371/hs_err_pid597.txt)\r\n[hs_err_pid31001.txt](https://github.com/orientechnologies/orientdb/files/102372/hs_err_pid31001.txt)\r\n[hs_err_pid47978.txt](https://github.com/orientechnologies/orientdb/files/102373/hs_err_pid47978.txt)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/orientechnologies/orientdb/issues/comments/174624310","html_url":"https://github.com/orientechnologies/orientdb/issues/5633#issuecomment-174624310","issue_url":"https://api.github.com/repos/orientechnologies/orientdb/issues/5633","id":174624310,"user":{"login":"Ashendra","id":2150598,"avatar_url":"https://avatars.githubusercontent.com/u/2150598?v=3","gravatar_id":"","url":"https://api.github.com/users/Ashendra","html_url":"https://github.com/Ashendra","followers_url":"https://api.github.com/users/Ashendra/followers","following_url":"https://api.github.com/users/Ashendra/following{/other_user}","gists_url":"https://api.github.com/users/Ashendra/gists{/gist_id}","starred_url":"https://api.github.com/users/Ashendra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ashendra/subscriptions","organizations_url":"https://api.github.com/users/Ashendra/orgs","repos_url":"https://api.github.com/users/Ashendra/repos","events_url":"https://api.github.com/users/Ashendra/events{/privacy}","received_events_url":"https://api.github.com/users/Ashendra/received_events","type":"User","site_admin":false},"created_at":"2016-01-25T19:08:59Z","updated_at":"2016-01-25T19:08:59Z","body":"This is not the issue I'm facing.  I posted wrong error dump. I have observed I am facing this issue, when I have -Dstorage.diskCache.bufferSize set to more than 16gb.\r\n\r\nThis was heap size of 8gb and concurrent sessions set to 3k. Also the 1mb used for each concurrent sessions is account from heap or non-heap memory?\r\n\r\nAttaching the correct error dump. \r\n[hs_err_pid37074.txt](https://github.com/orientechnologies/orientdb/files/103733/hs_err_pid37074.txt)\r\n\r\n"}}