Thats too fast not all threads can close in just miliseconds you know. Add "sleep 5" between stop and start and you should be fine.
Hello,
I was wondering if running the following commands
sudo /usr/local/apache2.3/bin/apachectl stop
echo $?
echo "should've stopped"
ps aux | grep apache | grep -v grep
sudo /usr/local/apache2.3/bin/apachectl start
echo $?
echo "should've started"
ps axu | grep apache | grep -v grep
should output something like this
0
should've stopped
root 22978 0.0 0.1 287964 30408 ? Ss 18:39 0:00 /usr/local/apache2.3/bin/httpd -k start
www-data 23019 0.0 0.1 501196 26920 ? S 18:39 0:00 /usr/local/apache2.3/bin/httpd -k start
www-data 23068 0.0 0.1 501196 26924 ? S 18:39 0:00 /usr/local/apache2.3/bin/httpd -k start
httpd (pid 22978) already running
0
should've started
root 22978 0.0 0.1 287964 30408 ? Ss 18:39 0:00 /usr/local/apache2.3/bin/httpd -k start
www-data 23019 0.0 0.1 501196 26920 ? S 18:39 0:00 /usr/local/apache2.3/bin/httpd -k start
www-data 23068 0.0 0.1 501196 26924 ? S 18:39 0:00 /usr/local/apache2.3/bin/httpd -k start
Moreover, doing ps aux | grep apache | grep -v grep after about a minute yields no result. But sometimes, it does show an apache instance running.
To me, it seems like the stop command and start one are processed in different orders.
My server configuration is the following:
Apache/2.3.4 (Unix) mod_ssl/2.3.4 OpenSSL/1.0.0e DAV/2 PHP/5.3.10
Server loaded APR Version: 1.4.0-dev
Module Magic Number: 20091119:1
MPM Name: worker
Server Architecture: 64-bit
Server Built With:
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT="/usr/local/apache2.3"
-D SUEXEC_BIN="/usr/local/apache2.3/bin/suexec"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
Best regards,
Silviu