免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: kingstone32
打印 上一主题 下一主题

[FreeBSD] 装BSD两个星期了,网站经常莫明其秒的挂掉,哪个高手帮帮我 [复制链接]

论坛徽章:
0
31 [报告]
发表于 2007-04-02 22:25 |只看该作者
下午加了条1G内存,竟然还是挂掉了,直接打不开论坛,难道是APACHE和MYSQL的版本太新不稳定??

HTTPD占用那么多内存是怎么回事??

从新贴一下现在的dmesg和top的结果:

www# top
last pid: 12011;  load averages: 66.50, 78.40, 77.48    up 0+05:50:42  23:26:09
935 processes: 22 running, 906 sleeping, 7 lock
CPU states: 25.6% user,  0.0% nice, 73.6% system,  0.8% interrupt,  0.0% idle
Mem: 1169M Active, 161M Inact, 484M Wired, 66M Cache, 213M Buf, 29M Free
Swap: 2002M Total, 423M Used, 1580M Free, 21% Inuse, 264K In

  PID USERNAME  THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU COMMAND
  605 mysql     440  20    0  1135M   273M kserel 0 346:48  4.39% mysqld
  608 root        1   8    0   117M   920K nanslp 0   0:24  0.00% httpd
8832 www         1   4    0   119M 10748K sbwait 1   0:02  0.00% httpd
9242 www         1   4    0   120M 10128K sbwait 0   0:02  0.00% httpd
10225 www         1   4    0   119M 11248K sbwait 1   0:01  0.00% httpd
9057 www         1   4    0   120M 10028K sbwait 1   0:01  0.00% httpd
10510 www         1   4    0   119M 11436K sbwait 0   0:01  0.00% httpd
9658 www         1   4    0   119M 11000K sbwait 0   0:01  0.00% httpd
9956 www         1   4    0   119M 11464K sbwait 1   0:01  0.00% httpd
10435 www         1   4    0   119M 11032K sbwait 0   0:01  0.00% httpd
9261 www         1   4    0   121M 10620K sbwait 1   0:01  0.00% httpd
10008 www         1   4    0   119M 11848K sbwait 0   0:01  0.00% httpd
9169 www         1   4    0   119M 11136K sbwait 0   0:01  0.00% httpd
9809 www         1   4    0   121M 12524K sbwait 1   0:01  0.00% httpd
10182 www         1   4    0   120M 11152K sbwait 1   0:01  0.00% httpd
10395 www         1   4    0   119M 11376K sbwait 1   0:01  0.00% httpd


www# dmesg
Copyright (c) 1992-2007 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 6.2-STABLE #0: Fri Mar 23 03:44:52 CST 2007
    root@www.local.com:/usr/obj/usr/src/sys/SuperKernel-SMP-ULE-64bit
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Pentium(R) D  CPU 2.66GHz (2660.21-MHz K8-class CPU)
  Origin = "GenuineIntel"  Id = 0xf47  Stepping = 7
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x651d<SSE3,RSVD2,MON,DS_CPL,TM2,CNTX-ID,CX16,XTPR>
  AMD Features=0x20100800<SYSCALL,NX,LM>
  AMD Features2=0x1<LAHF>
  Cores per package: 2
real memory  = 2139029504 (2039 MB)
avail memory = 2057859072 (1962 MB)
ACPI APIC Table: <GBT    AWRDACPI>
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
cpu0 (BSP): APIC ID:  0
cpu1 (AP): APIC ID:  1
ioapic0: Changing APIC ID to 2
ioapic0 <Version 2.0> irqs 0-23 on motherboard
kbd1 at kbdmux0
acpi0: <GBT AWRDACPI> on motherboard
acpi0: Power Button (fixed)
cpu0: <ACPI CPU> on acpi0
acpi_throttle0: <ACPI CPU Throttling> on cpu0
cpu1: <ACPI CPU> on acpi0
acpi_throttle1: <ACPI CPU Throttling> on cpu1
acpi_throttle1: failed to attach P_CNT
device_attach: acpi_throttle1 attach returned 6
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pci0: <display, VGA> at device 2.0 (no driver attached)
pci0: <serial bus, USB> at device 29.0 (no driver attached)
pci0: <serial bus, USB> at device 29.1 (no driver attached)
pci0: <serial bus, USB> at device 29.2 (no driver attached)
pci0: <serial bus, USB> at device 29.3 (no driver attached)
pci0: <serial bus, USB> at device 29.7 (no driver attached)
pcib1: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci1: <ACPI PCI bus> on pcib1
fxp0: <Intel 82559 Pro/100 Ethernet> port 0xa000-0xa03f mem 0xe0100000-0xe0100fff,0xe0000000-0xe00fffff irq 19 at device 1.0 on pci1
miibus0: <MII bus> on fxp0
inphy0: <i82555 10/100 media interface> on miibus0
inphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp0: Ethernet address: 00:03:47:98:f5:ee
pci1: <network, ethernet> at device 5.0 (no driver attached)
pci0: <multimedia, audio> at device 30.2 (no driver attached)
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH7 SATA300 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xf000-0xf00f at device 31.2 on pci0
ata0: <ATA channel 0> on atapci0
ata1: <ATA channel 1> on atapci0
pci0: <serial bus, SMBus> at device 31.3 (no driver attached)
ppc0: <Standard parallel printer port> port 0x378-0x37f irq 7 on acpi0
ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
ppbus0: <Parallel port bus> on ppc0
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: model Generic PS/2 mouse, device ID 0
orm0: <ISA Option ROM> at iomem 0xc0000-0xca7ff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounters tick every 1.000 msec
ipfw2 (+ipv6) initialized, divert loadable, rule-based forwarding disabled, default to accept, logging limited to 20 packets/entry by default
ad2: 156333MB <Maxtor 6L160M0 BACE1G20> at ata1-master SATA150
SMP: AP CPU #1 Launched!
Trying to mount root from ufs:/dev/ad2s1a
WARNING: / was not properly dismounted
WARNING: /tmp was not properly dismounted
WARNING: /usr was not properly dismounted
/usr: mount pending error: blocks 4 files 0
WARNING: /var was not properly dismounted
/var: mount pending error: blocks 24 files 14
fxp0: device timeout
fxp0: device timeout
fxp0: link state changed to UP
fxp0: SCB timeout: 0x70 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: SCB timeout: 0xf0 0x0 0x50 0x400
fxp0: device timeout
collecting pv entries -- suggest increasing PMAP_SHPGPERPROC

[ 本帖最后由 kingstone32 于 2007-4-2 23:27 编辑 ]

论坛徽章:
0
32 [报告]
发表于 2007-04-03 08:46 |只看该作者
关注

论坛徽章:
0
33 [报告]
发表于 2007-04-03 09:08 |只看该作者
把httpd.conf里的KeepAlive设成off试一下,应该会好一点点

论坛徽章:
0
34 [报告]
发表于 2007-04-03 09:57 |只看该作者
last pid: 12011;  load averages: 66.50, 78.40, 77.48    up 0+05:50:42  23:26:09
935 processes: 22 running, 906 sleeping, 7 lock
CPU states: 25.6% user,  0.0% nice, 73.6% system,  0.8% interrupt,  0.0% idle
Mem: 1169M Active, 161M Inact, 484M Wired, 66M Cache, 213M Buf, 29M Free
Swap: 2002M Total, 423M Used, 1580M Free, 21% Inuse, 264K In


上帝呀...

论坛徽章:
0
35 [报告]
发表于 2007-04-03 10:20 |只看该作者
跟我的一样,Load会变和非常大,能达到300多,跟死机一样,我快晕了,再解决不了我得换linux,被老板披了好几天了

论坛徽章:
0
36 [报告]
发表于 2007-04-03 10:21 |只看该作者
原帖由 cdcchen 于 2007-4-3 09:08 发表
把httpd.conf里的KeepAlive设成off试一下,应该会好一点点


httpd.conf里面怎么没有KeepAlive这个参数呢?加在哪里?

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
37 [报告]
发表于 2007-04-03 10:27 |只看该作者
LZ的mysql到底怎么设置的?

论坛徽章:
0
38 [报告]
发表于 2007-04-03 10:41 |只看该作者
刚装系统的时候为了不出乱码,用的是MYSQL4.0.27,调整参数不见好转后现在转成了MYSQL5
my.cnf配置如下:

# Example MySQL config file for very large systems.
#
# This is for a large system with memory of 1G-2G where the system runs mainly
# MySQL.
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /usr/local/mysql5/var) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.

# The following options will be passed to all MySQL clients
[client]
#password       = your_password
port            = 3306
socket          = /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port            = 3306
socket          = /tmp/mysql.sock
skip-locking
key_buffer = 384M
max_allowed_packet = 1M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
max_connections=2048


# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking

# Replication Master Server (default)
# binary logging is required for replication
#log-bin=mysql-bin

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id       = 1

# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
#    the syntax is:
#
#    CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
#    MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
#    where you replace <host>, <user>, <password> by quoted strings and
#    <port> by the master's port number (3306 by default).
#
#    Example:
#
#    CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
#    MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
#    start replication for the first time (even unsuccessfully, for example
#    if you mistyped the password in master-password and the slave fails to
#    connect), the slave will create a master.info file, and any later
#    change in this file to the variables' values below will be ignored and
#    overridden by the content of the master.info file, unless you shutdown
#    the slave server, delete master.info and restart the slaver server.
#    For that reason, you may want to leave the lines below untouched
#    (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id       = 2
#
# The replication master for this slave - required
#master-host     =   <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user     =   <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password =   <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port     =  <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin

# Point the following paths to different dedicated disks
#tmpdir         = /tmp/
#log-update     = /path-to-dedicated-directory/hostname

# Uncomment the following if you are using BDB tables
#bdb_cache_size = 384M
#bdb_max_lock = 100000

# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /usr/local/mysql5/var/
#innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
#innodb_log_group_home_dir = /usr/local/mysql5/var/
#innodb_log_arch_dir = /usr/local/mysql5/var/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 384M
#innodb_additional_mem_pool_size = 20M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 100M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

[ 本帖最后由 kingstone32 于 2007-4-3 10:43 编辑 ]

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
39 [报告]
发表于 2007-04-03 10:44 |只看该作者
mysql的日志里的错误信息呢》、

论坛徽章:
0
40 [报告]
发表于 2007-04-03 13:28 |只看该作者
错误日志比较大,我以附件形式发上来

www.local.com.rar

5.3 KB, 下载次数: 54

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP