[ 
http://jira.magnolia-cms.com/browse/MAGNOLIA-1959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=21121#action_21121
 ] 

Tom Wespi commented on MAGNOLIA-1959:
-------------------------------------

Quote from http://discussions.apple.com/thread.jspa?threadID=1449787&tstart=195 
| May 3, 2008

<quote>
Just following up my previous posts and the solution we found to work with the 
'Too Many Open Files' error, maybe it will help others as well.

The problem seems to be in the way Apple has changed the files/proc settings 
for Leopard. Using the 'ulimit' and 'sysctl' options to adjust the settings no 
longer works.

The option you have to use is the 'launchctl limit' command, which also adjusts 
both the 'ulimit' and the 'sysctl' settings automatically.

To check your existing settings, you can use the command 'launchctl limit', 
this shows that the server is ridiculously set at a very low maxfiles of 256 
files per user/process.

Three columns will be returned, the first column displayed will be the name of 
the limit setting, you are looking for the 'maxproc' and/or 'maxfiles' settings 
towards the bottom of the list.

To increase the maxfiles you can use the command 'launchctl limit maxfiles user 
max system max', where user max is the maximum files you want to allow for each 
user/process and likewise for system max.

An example would be (running as super user): launchctl limit maxfiles 2048 
unlimited

We first increased this to 2048 unlimited as Apple states in the manual that 
the Server Admin app is supposed to change the soft process limit from 100 (the 
default) to 2048 when starting Apache, obviously this is not happening and the 
default is set to 256, so the manual is out of date or wrong. We did however 
still find infrequent 'too many open files' errors in apache logs so again 
increased the limit, this time to 4096 unlimited and have not had a problem 
since.

The same applies to the maxproc setting if you need additional processes.

You can verify the changes by using the 'ulimit -a' and/or 'sysctl -a | grep 
files' commands.

To make the changes stick through a restart, you need to add a file (as it 
doesn't exist) by using something like 'sudo pico /etc/launchd.conf' and add 
the changes one per line, so in our case, our file looks like this:

limit maxfiles 4096 unlimited

Remember you do not need to add 'launchctl' in front of the commands in this 
file.

Hope this helps others with this problem, we have not upgraded to 10.5.3 yet, 
now that things are working in 10.5.2 we will have to setup a test environment 
before applying anymore potential fuel to the fire!
</quote>

So I increased the maxfiles to 4096 (launchctl limit maxfiles 4096 unlimited) 
and the maxproc to 2048 (launchctl limit maxproc 2048 unlimited).

After this two instances are starting fine.

osx 10.5.6
EE rc3
tomcat 5.5.27



> Leopard (osx 10.5) issues
> -------------------------
>
>                 Key: MAGNOLIA-1959
>                 URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-1959
>             Project: Magnolia
>          Issue Type: Bug
>    Affects Versions: 3.5
>            Reporter: Gregory Joseph
>            Assignee: Gregory Joseph
>
> h3. Leopard's application level firewall : 
> Leopard's firewall behaves significantly differently than the firewall 
> shipped with OSX 10.4. The symptoms are that Tomcat seems unreachable 
> ("kCFErrorDomainCFNetwork:302"), but unfortunately no log message *clearly* 
> identifies the issue.
> It seems the behavior was different prior to OSX 10.5.3, but at least in 
> 10.5.4 the following seems to work:
> - "allow incoming connections" for the Magnolia and Tomcat scripts 
> ({{magnolia_control.sh}}, {{startup.sh}}, {{shutdown.sh}}, {{catalina.sh}}), 
> as well as the Java binary (ie 
> {{/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Commands/java}})
> - it seems sometimes necessary to "lock" and "unlock" the firewall settings 
> pane, so as to force it to take the new settings into account.
> - if Magnolia was started, you'll have to kill it (-HUP works and shuts it 
> down nicely) and restart. 
> h4. More comments and questions
> - somehow, setting the firewall too "allow all" does not seem to help.
> - {{sudo launchctl remove com.apple.alf}} should remove the application-level 
> firewall, but for some reason, this hasn't proved very useful. Will have to 
> try again.
> h4. Log files to watch:
>  * {{/var/log/system.log}}
>  * {{/var/log/secure.log}}
>  * {{/var/log/appfirewall.log}}
> h4. Some interesting links:
>  * http://securosis.com/2007/11/01/investigating-the-leopard-firewall/
>  * http://documentation.magnolia.info/administration.html#Knownissues which 
> links back to here but has a nice little screenshot of Leopard's firewall 
> configuration gui ;)
> h3. "Max.files opened"
> There might be some "max.files opened" issues, with settings which are 
> different from Tiger(10.4), although this hasn't been reported in a while.
> There is unfortunately not much we can do about this issue at the moment, as 
> far as we know. 
> *Feel free to comment on your own experience below and contribute tips and 
> tricks !*

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <dev-list-unsubscr...@magnolia-cms.com>
----------------------------------------------------------------

Reply via email to