OpenVZ Forum


Home » General » Support » *SOLVED* Problem with restarting services
*SOLVED* Problem with restarting services [message #10827] Mon, 05 March 2007 10:48 Go to next message
Achmed is currently offline  Achmed
Messages: 17
Registered: January 2007
Junior Member
Hi,
today i have set up my first VE on a "real" server.
I set:
--ostemplate opensuse-10-x86_64-default --config vps.basic
--vmguarpages 128M:2147483647
--privvmpages 256M:266M
--diskspace 5120M:5220M
When i try to restart ssh i get a:
# /etc/init.d/sshd restart
Shutting down SSH daemon                                              done
Starting SSH daemonstartproc: cannot stat /proc/15428/exe: Permission denied
                                                                      failed

But its running.
/etc/init.d/sshd status gives a "running"

Same problem with Apache.
First start worls fine, but a restart gives:
# /etc/init.d/apache2 restart
/etc/rc.status: fork: Cannot allocate memory
/etc/rc.status: line 43: test: -eq: unary operator expected
/etc/rc.status: line 44: test: -eq: unary operator expected
/usr/share/apache2/get_module_list: fork: Cannot allocate memory
Warning: no MPM found. Some modules are dependant on the type of MPM.
Module "cgi" is not installed, ignoring.
Check the APACHE_MODULES setting in /etc/sysconfig/apache2.
Module "ssl" is not installed, ignoring.
Check the APACHE_MODULES setting in /etc/sysconfig/apache2.
/usr/share/apache2/get_includes: fork: Cannot allocate memory
Warning: no MPM found. Some modules are dependant on the type of MPM.
/etc/rc.status: fork: Cannot allocate memory
/etc/rc.status: line 43: test: -eq: unary operator expected
/etc/rc.status: line 44: test: -eq: unary operator expected
/etc/init.d/apache2: fork: Cannot allocate memory
/usr/share/apache2/get_includes: fork: Cannot allocate memory
httpd2-worker: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Syntax OK
/etc/rc.status: fork: Cannot allocate memory
/etc/rc.status: line 43: test: -eq: unary operator expected
/etc/rc.status: line 44: test: -eq: unary operator expected
/etc/init.d/apache2: fork: Cannot allocate memory
doneting down httpd2 (waiting for all children to terminate)
Starting httpd2 (worker) httpd2-worker: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
startproc: cannot stat /proc/15636/exe: Permission denied
                                                                      done

And again...its running.

Anybody an idea, whats wrong?
Do i have to give more ram to the VE?
I thought, 128-256 should be enough.
And why do i get a "permission denied" ?

[Updated on: Mon, 05 March 2007 16:53] by Moderator

Report message to a moderator

Re: Problem with restarting services [message #10831 is a reply to message #10827] Mon, 05 March 2007 13:24 Go to previous messageGo to next message
Achmed is currently offline  Achmed
Messages: 17
Registered: January 2007
Junior Member
Ok, i found out, whats wrong.
The VE always rans out of memory.
This also happens, if i do not set anything exept diskspace, or if i set vmguarpages 512M.
user_beancounters:
       uid  resource                     held              maxheld              barrier                limit              failcnt
      101:  kmemsize                   592549              3021049              5242880              5592405                    0
            lockedpages                     0                    0                   32                   32                    0
            privvmpages                  1914                65729                35000                38181                  211
            shmpages                        0                  705                 8192                 8192                    0
            dummy                           0                    0                    0                    0                    0
            numproc                         5                   65                   65                   65                   52
            physpages                     623                11594                    0  9223372036854775807                    0
            vmguarpages                     0                    0                 6144  9223372036854775807                    0
            oomguarpages                  623                11594                 6144  9223372036854775807                    0
            numtcpsock                      2                    6                   80                   80                    0
            numflock                        1                    7                  100                  110                    0
            numpty                          0                    2                   16                   16                    0
            numsiginfo                      0                   14                  256                  256                    0
            tcpsndbuf                       0                32144               319488               524288                    0
            tcprcvbuf                       0               340104               319488               524288                  122
            othersockbuf                 2296                13808               132096               336896                    0
            dgramrcvbuf                     0                 8440               132096               132096                    0
            numothersock                    1                    7                   80                   80                    0
            dcachesize                      0                    0              1048576              1097728                    0
            numfile                       140                 1165                 2048                 2048                    0
            dummy                           0                    0                    0                    0                    0
            dummy                           0                    0                    0                    0                    0
            dummy                           0                    0                    0                    0                    0
            numiptent                      10                   10                  128                  128                    0


Any ideas, how to solve this problem?
Re: Problem with restarting services [message #10840 is a reply to message #10831] Mon, 05 March 2007 16:05 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
privvmpages                  1914                65729                35000                38181                  211
numproc                         5                   65                   65                   65                   52
tcprcvbuf                       0               340104               319488               524288                  122


As u can see the limits/barriers for parameters above are too low. Please, increase them using `vzctl set` command. Additional information at http://wiki.openvz.org/Resource_shortage

HTH,
Vasily
Re: Problem with restarting services [message #10846 is a reply to message #10827] Mon, 05 March 2007 16:49 Go to previous messageGo to next message
Achmed is currently offline  Achmed
Messages: 17
Registered: January 2007
Junior Member
I increased numproc up to 150 and it works. Smile
Thanks a lot. Smile
I thought the problem was only privvmpages, because of the "cannot allocate memory".
What would be a good number of numproc's to set to?
And how big should i set tcprcvbuf ?
For a VE, running an Apache,MySQl and PHP.
Re: Problem with restarting services [message #10847 is a reply to message #10846] Mon, 05 March 2007 16:53 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
It's hard to estimate. Just run your VEs and if you'll encounter failcounters - increase limits/barriers.

Good luck.
Re: *SOLVED* Problem with restarting services [message #10877 is a reply to message #10827] Tue, 06 March 2007 09:39 Go to previous message
Achmed is currently offline  Achmed
Messages: 17
Registered: January 2007
Junior Member
Oki,
Thanks Smile
Previous Topic: Network Routing Question
Next Topic: *CLOSED* softirq stats for a VE
Goto Forum:
  


Current Time: Mon Jun 17 01:25:36 GMT 2024

Total time taken to generate the page: 0.04149 seconds