ulimit error on zendctl.sh start

General discussion forum for the Zend Server
Post Reply
smithdg
Posts: 41
Joined: Sun Mar 22, 2009 3:32 am

ulimit error on zendctl.sh start

Post by smithdg » Wed Apr 01, 2009 8:31 pm

Just an fyi, not sure if it hurts anything.
Starting ZendServer 4.0.0 ..

/Applications/ZendServer/bin/apachectl: line 84: ulimit: open files: cannot modify limit: Invalid argument
httpd (pid 16359) already running
/Applications/ZendServer/bin/apachectl start [OK]
spawn-fcgi.c.251: socket is already used, can't spawn
lighttpd watchdog is up and running.. [OK]
[01.04.2009 14:06:26 SYSTEM] watchdog for lighttpd is running.
[01.04.2009 14:06:26 SYSTEM] lighttpd is running.
java_daemon watchdog is up and running.. [OK]
[01.04.2009 14:06:26 SYSTEM] watchdog for java_daemon is running.
[01.04.2009 14:06:26 SYSTEM] java_daemon is running.

ZendServer started...
74 # Set this variable to a command that increases the maximum
75 # number of file descriptors allowed per child process. This is
76 # critical for configurations that use many file descriptors,
77 # such as mass vhosting, or a multithreaded server.
78 ULIMIT_MAX_FILES="ulimit -S -n `ulimit -H -n`"
79 # -------------------- --------------------
80 # |||||||||||||||||||| END CONFIGURATION SECTION ||||||||||||||||||||
81
82 # Set the maximum number of file descriptors allowed per child process.
83 if [ "x$ULIMIT_MAX_FILES" != "x" ] ; then
84 $ULIMIT_MAX_FILES
85 fi

massimilianoc
Posts: 699
Joined: Thu Mar 12, 2009 11:58 am

Re: ulimit error on zendctl.sh start

Post by massimilianoc » Thu Apr 02, 2009 12:44 am

Thanks for the the valuable input, we' ll look into the issue.

I think you are working on a Mac OSX system, right?

Thanks again,
Massi.
Best regards,
Massi.

smithdg
Posts: 41
Joined: Sun Mar 22, 2009 3:32 am

Re: ulimit error on zendctl.sh start

Post by smithdg » Thu Apr 02, 2009 3:16 am

Yes, that is correct.

thanks,
Danny

jnguyen1207
Posts: 6
Joined: Sun Apr 05, 2009 3:52 am

Re: ulimit error on zendctl.sh start

Post by jnguyen1207 » Sun Apr 05, 2009 3:56 am

I have the same problem. I am also using Mac OS "Leopard" 10.5.6. Any update on this?

John

jess04
Posts: 628
Joined: Thu Jan 15, 2009 3:37 pm

Re: ulimit error on zendctl.sh start

Post by jess04 » Sun Apr 05, 2009 8:40 am

Hello,

This comes directly from the apachectl [part of the official Apache source code], the error occurs when /usr/local/zend/bin/apachectl attempts to execute:
# ulimit -S -n `ulimit -H -n`

Unfortunately, these flags, while supported by the ulimit utility as provided on Linux, are not supported on MAC.
This warning is far from harmful, actually, apart from the output:
"cannot modify limit: Invalid argument"
It has no bad affect on the Apache.

Regardless, I will bring this to the attention of the Apache project.

Thanks for testing ZendServer,
May the source be with you,

Jess Portnoy

dthomas2
Posts: 3
Joined: Thu Apr 16, 2009 3:33 am

Re: ulimit error on zendctl.sh start

Post by dthomas2 » Thu Apr 16, 2009 3:44 am

>Unfortunately, these flags, while supported by the ulimit utility as
>provided on Linux, are not supported on MAC
I don't think the problem is from the flags
I'm on MacOs X 10.5.6

/usr/bin/ulimit invokes the builtin
ulimit: usage: ulimit [-SHacdfilmnpqstuvx] [limit]
so '-S', '-H' and '-n- flags are supported

/usr/bin/ulimit -H -n
unlimited

# we can set a numeric value
/usr/bin/ulimit -S -n 9999

# I think the problem comes because -n expects a number
# but I couldn't find proper documentation for ulimit
# to confirm that
usr/bin/ulimit -S -n unlimited
/usr/bin/ulimit: line 4: ulimit: open files: cannot modify limit: Invalid argument

Post Reply