日期:2014-05-20  浏览次数:20765 次

项目登陆有时会出现卡死现象,有经验的朋友请进
问题描述:[项目登陆的时候一般都是没问题的,但是又时候登陆会出现卡住。
补充描述:有的时候卡住一段时间(时间稍长)之后,也能登陆。在登陆某个账户又退出之后电脑的cpu会连续在50%以上,这种情况出现后比较容易出现登陆卡住的现象,有时候甚至会出现提示tomcat重启。
项目信息:web端项目Spring、Hibernate注解,DWR注解。数据库:MySQL。服务器:tomcat
解决过程:刚开始认为有可能是数据库死锁或者计算机的内存不够,不过后来看了数据库的InnoDB信息和机器任务管理器之后均被排除。
提问:这种情况是不是tomcat服务器出了某些问题,例如tomcat服务器的启动内存等等
希望大家能够提出有可能的问题,并根据自己提出的问题,做出验证或者解决的相应处理
下面是MySql数据库InnoDB信息:
HTML code

----------------------+
| InnoDB |      |
=====================================
110908 13:27:36 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 52 seconds
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 4, signal count 4
Mutex spin waits 0, rounds 20, OS waits 0
RW-shared spins 8, OS waits 4; RW-excl spins 0, OS waits 0
------------
TRANSACTIONS
------------
Trx id counter 0 430612
Purge done for trx's n:o < 0 429783 undo n:o < 0 0
History list length 3
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0 0, not started, OS thread id 2520
MySQL thread id 16, query id 580 localhost 127.0.0.1 root
show innodb status
---TRANSACTION 0 0, not started, OS thread id 2532
MySQL thread id 13, query id 579 callcenter 192.168.8.247 root
---TRANSACTION 0 430611, ACTIVE 128 sec, OS thread id 1624 fetching rows, thread
 declared inside InnoDB 452
mysql tables in use 13, locked 0
MySQL thread id 15, query id 552 callcenter 192.168.8.247 root Sending data
SELECT * FROM Models WHERE Gid IN (SELECT Gid FROM Models WHERE showMenu = 1 and
 state=1 And appModelGid = '6fe8a93f-64b3-d10f-964f-5aaa08191e5e'  and Gid in(SE
LECT parent_id FROM Models WHERE Gid IN (SELECT Model_id FROM Actions WHERE Gid
IN (SELECT actions_id FROM Roles_Actions WHERE roles_id = '1b86fe4d-3e7b-2e30-e6
02-aaf71c48f435,9cab2734-e92d-831c-2e87-e30306a0bcc9'       ))))or Gid IN (SELEC
T Gid FROM Models WHERE showMenu = 1 and state=1  And appModelGid = '6fe8a93f-64
b3-d10f-964f-5aaa08191e5e'  and Gid in(SELECT Model_id FROM Actions WHERE Gid IN
 (SELECT actions_id FROM Roles_Actions W
Trx read view will not see trx with id >= 0 430612, sees < 0 430612
--------
FILE I/O
--------
I/O thread 0 state: wait Windows aio (insert buffer thread)
I/O thread 1 state: wait Windows aio (log thread)
I/O thread 2 state: wait Windows aio (read thread)
I/O thread 3 state: wait Windows aio (write thread)
Pending normal aio reads: 0, aio writes: 0,
 ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0
Pending flushes (fsync) log: 0; buffer pool: 0
226 OS file reads, 10 OS file writes, 10 OS fsyncs
0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 0, seg size 2,
0 inserts, 0 merged recs, 0 merges
Hash table size 1187107, node heap has 1 buffer(s)
0.52 hash searches/s, 0.00 non-hash searches/s
---
LOG
---
Log sequence number 0 292717601
Log flushed up to   0 292717601
Last checkpoint at  0 292717601
0 pending log writes, 0 pending chkp writes
11 log i/o's done, 0.00 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 327041672; in additional pool allocated 1551360
Dictionary memory allocated 43208
Buffer pool size   18304
Free buffers       18215
Database pages     88
Modified db pages  0
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages read 88, created 0, written 2
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
Buffer pool hit rate 1000 / 1000
--------------
ROW OPERATIONS
--------------
1 queries inside InnoDB, 0 queries in queue
2 read views open inside InnoDB
Main thread id 1512, state: waiting for server activity
Number of rows inserted 0, updated 0, deleted 0, read 405772588
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 712664.89 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
============================