| | 1 | = Restart Failed Server = |
| | 2 | |
| | 3 | From time to time our virtual servers exceed their allocated memory and fail with oom (out of memory) errors. It is usually necessary to perform a hard reset of the virtual servers. |
| | 4 | |
| | 5 | How to reset a virtual server depends on the virtualization technology in use by the server. |
| | 6 | |
| | 7 | The first step is to [wiki:server_overview checkout our SVN repository of servers]. |
| | 8 | |
| | 9 | Then, examine the "available-servers" directory. You should see a directory for every server we are running. |
| | 10 | |
| | 11 | Inside each directory, there's a file called "virtualization". |
| | 12 | |
| | 13 | The virtualization file will say either: vserver, xen, or kvm. |
| | 14 | |
| | 15 | In addition, there's a symlink called "host" which will point to the host server for this virtual server. For all servers, you will need to [wiki:secure_shell ssh] into the host server to perform a reset. |
| | 16 | |
| | 17 | == xen == |
| | 18 | |
| | 19 | * Unplug the server: |
| | 20 | {{{ |
| | 21 | xm destroy <server-name> |
| | 22 | }}} |
| | 23 | * Restart the server: |
| | 24 | {{{ |
| | 25 | xm create -c <server-name> |
| | 26 | }}} |
| | 27 | |
| | 28 | == kvm == |
| | 29 | |
| | 30 | * unplug the server: |
| | 31 | {{{ |
| | 32 | sv down <server-name> |
| | 33 | }}} |
| | 34 | * restart: |
| | 35 | {{{ |
| | 36 | sv up <server-name> |
| | 37 | }}} |
| | 38 | |
| | 39 | == vserver == |
| | 40 | |
| | 41 | * shutdown |
| | 42 | {{{ |
| | 43 | vserver <server-name> stop |
| | 44 | }}} |
| | 45 | * start |
| | 46 | {{{ |
| | 47 | vserver <server-name> start |
| | 48 | }}} |