- 论坛徽章:
- 0
|
我们的服务器在美国,有8G内存,上面只有一个apache和mysql、一个服务器管理的程序
但是内存就用了只剩下20M左右,现在要运行另一个java(tomcat)就出现以下错误:
- [root@server ~]# java
- Error occurred during initialization of VM
- Could not reserve enough space for object heap
- Could not create the Java virtual machine.
复制代码
以下是top信息:
- top - 01:37:31 up 1 day, 3:21, 1 user, load average: 0.00, 0.00, 0.00
- Tasks: 28 total, 1 running, 27 sleeping, 0 stopped, 0 zombie
- Cpu(s): 0.0% us, 0.0% sy, 0.0% ni, 100.0% id, 0.0% wa, 0.0% hi, 0.0% si
- Mem: 8145020k total, 8129344k used, 15676k free, 42588k buffers
- Swap: 12586916k total, 4988740k used, 7598176k free, 1063064k cached
- PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
- 3810 root 21 0 309m 107m 15m S 0 1.4 0:51.83 java
- 1823 mysql 16 0 122m 19m 4044 S 0 0.2 0:13.02 mysqld
- 8138 apache 16 0 35132 15m 3396 S 0 0.2 0:02.30 httpd
- 12281 apache 16 0 35032 15m 3408 S 0 0.2 0:01.57 httpd
- 26506 apache 16 0 35048 15m 3396 S 0 0.2 0:00.29 httpd
- 3874 root 16 0 30084 14m 8132 S 0 0.2 0:01.73 httpd
- 27969 apache 16 0 32860 12m 3048 S 0 0.2 0:00.14 httpd
- 14109 apache 16 0 30084 8916 1808 S 0 0.1 0:00.00 httpd
- 4014 root 15 0 18408 5220 140 S 0 0.1 0:00.00 httpd
- 32498 named 20 0 68496 3468 1872 S 0 0.0 0:00.26 named
- 3625 postgres 16 0 16736 2032 1668 S 0 0.0 0:00.02 postmaster
- 18366 root 16 0 6624 1996 1640 S 0 0.0 0:00.00 sshd
- 4012 root 16 0 2156 1360 1092 S 0 0.0 0:00.07 bash
- 18407 spotmau 16 0 6756 1340 920 S 0 0.0 0:00.09 sshd
- 18416 spotmau 15 0 2148 1300 1084 S 0 0.0 0:00.00 bash
- 28648 root 17 0 2284 1220 844 S 0 0.0 0:00.00 su
- 1709 root 17 0 2144 1136 972 S 0 0.0 0:00.00 mysqld_safe
- 32590 root 16 0 4004 1028 740 S 0 0.0 0:00.00 sshd
- 1506 root 15 0 3708 1020 796 S 0 0.0 0:00.00 vsftpd
- 3676 postgres 18 0 6544 992 584 S 0 0.0 0:00.00 postmaster
- 24179 root 16 0 1888 980 792 R 0 0.0 0:00.38 top
- 3883 root 16 0 2472 920 536 S 0 0.0 0:00.00 crond
- 3675 postgres 18 0 7536 836 468 S 0 0.0 0:00.00 postmaster
- 3894 root 18 0 4044 804 576 S 0 0.0 0:00.00 saslauthd
- 1483 root 15 0 2072 768 640 S 0 0.0 0:00.00 xinetd
- 1 root 16 0 1620 600 520 S 0 0.0 0:00.01 init
- 32337 root 16 0 1524 540 456 S 0 0.0 0:00.02 syslogd
- 3896 root 18 0 4044 464 236 S 0 0.0 0:00.00 saslauthd
复制代码
以下是fdisk
- [root@server ~]# df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/vzfs 10G 2.6G 7.5G 26% /
复制代码
没有Swap??
服务器管理程序就是端口为9999的web管理界面:管理URL:https://server:9999
以下是netstat信息:
- [root@server ~]# netstat -ntlp
- Active Internet connections (only servers)
- Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
- tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 1823/mysqld
- tcp 0 0 127.0.0.1:9998 0.0.0.0:* LISTEN 3810/java
- tcp 0 0 0.0.0.0:9999 0.0.0.0:* LISTEN 3810/java
- tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 3874/httpd
- tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 1506/vsftpd
- tcp 0 0 0.0.0:53 0.0.0.0:* LISTEN 32498/named
- tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 32498/named
- tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 32590/sshd
- tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN 3625/postmaster
- tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 32498/named
- tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 3874/httpd
复制代码
经了解此服务器是VIRTUAL DEDICATED SERVER
还有个很奇怪的事就是,查看/etc/profile和~/.bash_profile都没有设定JAVA_HOME,但echo $JAVA_HOME就又有显示为/usr/java/jdk
真是怪了,OS是CentOS 4.4版本
有人了解吗???怎么回事!
[ 本帖最后由 romexp 于 2007-12-27 21:01 编辑 ] |
|