[{"data":1,"prerenderedAt":297},["ShallowReactive",2],{"Categories":3,"NavIndexCategoriesCountFooter":203,"content-\u002F2009\u002F03\u002F25\u002Fincreasing-max-number-of-open-files-for-glassfish-user-on-debian\u002F":204},[4,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,68,70,71,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202],{"category":5},"System Administration",{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":27},"Software Development",{"category":5},{"category":5},{"category":5},{"category":5},{"category":27},{"category":27},{"category":5},{"category":5},{"category":5},{"category":27},{"category":5},{"category":5},{"category":5},{"category":27},{"category":27},{"category":27},{"category":27},{"category":5},{"category":5},{"category":5},{"category":27},{"category":27},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":5},{"category":27},{"category":5},{"category":5},{"category":27},{"category":27},{"category":27},{"category":27},{"category":5},{"category":27},{"category":27},{"category":67},"Drones & RC",{"category":69},"DIY Projects",{"category":67},{"category":72},"Photography",{"category":69},{"category":69},{"category":69},{"category":67},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":69},{"category":67},{"category":69},{"category":69},{"category":67},{"category":67},{"category":72},{"category":72},{"category":72},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":5},{"category":5},{"category":72},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":5},{"category":67},{"category":67},{"category":72},{"category":72},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":67},{"category":72},{"category":67},{"category":138},"3D Printing - Laser Cutting - CNC",{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":138},{"category":5},{"category":138},{"category":27},{"category":27},{"category":138},{"category":138},{"category":72},{"category":158},"Photography,3D Printing - Laser Cutting - CNC",{"category":27},{"category":27},{"category":69},{"category":27},{"category":27},{"category":27},{"category":27},{"category":5},{"category":67},{"category":5},{"category":5},{"category":27},{"category":27},{"category":27},{"category":27},{"category":27},{"category":69},{"category":27},{"category":27},{"category":27},{"category":27},{"category":181},"Home Assistant",{"category":181},{"category":72},{"category":27},{"category":27},{"category":72},{"category":138},{"category":5},{"category":72},{"category":72},{"category":138},{"category":27},{"category":181},{"category":181},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},{"category":72},191,{"id":205,"title":206,"body":207,"category":5,"date":281,"description":213,"embedImage":282,"extension":283,"image":282,"intro":282,"meta":284,"navigation":285,"path":286,"seo":287,"series":282,"sitemap":288,"stem":289,"tags":290,"__hash__":296},"content\u002F2009\u002F03\u002F25\u002Fincreasing-max-number-of-open-files-for-glassfish-user-on-debian.md","Increasing max number of open files for glassfish user on debian",{"type":208,"value":209,"toc":278},"minimark",[210,214,217,224,234,240,243,253,256,259,266,272],[211,212,213],"p",{},"My glassfish process kept dying with \"Too many open files\" in the log.",[211,215,216],{},"I'm not surprised that it has too many - it has quite a few large applications running - but how to increase this?",[211,218,219,223],{},[220,221,222],"code",{},"ulimit -n"," shows that the user has a default of 1024.",[211,225,226,227,230,231],{},"But ",[220,228,229],{},"ulimit -n 2048"," gives ",[220,232,233],{},"-su: ulimit: open files: cannot modify limit: Operation not permitted",[211,235,236,237],{},"Some digging leads to ",[220,238,239],{},"\u002Fetc\u002Fsecurity\u002Flimits.conf",[211,241,242],{},"Here we added:",[244,245,250],"pre",{"className":246,"code":248,"language":249},[247],"language-text","glassfish        hard    nofile          2048\nglassfish        soft    nofile          2048\n","text",[220,251,248],{"__ignoreMap":252},"",[211,254,255],{},"However - even after logging in and out glassfish still had 1024 and no right to change.",[211,257,258],{},"The issue here is that I'm using su to change to the glassfish user. And the pam config for su doesn't pay this limits.conf file any attention until you tell it to.",[211,260,261,262,265],{},"In ",[220,263,264],{},"\u002Fetc\u002Fpam.d\u002Fsu"," uncomment the line",[244,267,270],{"className":268,"code":269,"language":249},[247],"session    required   pam_limits.so\n",[220,271,269],{"__ignoreMap":252},[211,273,274,275,277],{},"Log out and in to glassfish and finally ",[220,276,222],{}," shows 2048.",{"title":252,"searchDepth":279,"depth":279,"links":280},2,[],"2009-03-25 09:31:30 +0100",null,"md",{},true,"\u002F2009\u002F03\u002F25\u002Fincreasing-max-number-of-open-files-for-glassfish-user-on-debian",{"title":206,"description":213},{"loc":286},"2009\u002F03\u002F25\u002Fincreasing-max-number-of-open-files-for-glassfish-user-on-debian",[291,292,293,294,295],"linux","debian","glassfish","ulimit","tutorial","ipp3Kc_3XJ1ozF1EtFcaFjvelJ_3aNzmBEa-3P3jPDw",1775293014976]