database.sarang.net
UserID
Passwd
Database
DBMS
ㆍMySQL
PostgreSQL
Firebird
Oracle
Informix
Sybase
MS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
MySQL Q&A 27797 게시물 읽기
No. 27797
따뜻한 답변 부탁드립니다...
작성자
김군(redsboom)
작성일
2008-09-20 11:22ⓒ
2008-09-20 11:24ⓜ
조회수
3,790

프로그렘에서
SELECT count(*) 절이 250개
update  문이 45개 정도 됩니다.
프로그램 돌리면 돌리는 순간 show processlist 확인해보면
한 쿼리당 1초 , 2초 정도씩 한줄 한줄 쿼리문을 실행하는걸 볼수 있습니다.

어떤경우에는 5분정도뒤에 페이지에 결과 값이 나옵니다.

문제는 "페이지를 찾을수 없습니다"라고 나오는 경우가 많다는거구요..

이렇게 되다 안되다 하는걸 php튜닝을 받아보라느는 말을 하시는 분도 계시구요,
슬로우쿼리 로그를 살펴보면 해당 쿼리에는 크게 문제 없습니다.

될때도 있고 안될때도 있는건 mysql 문제가 아닐런지해서 질문 합니다.

따뜻한 답변 부탁 드립니다.


리눅스 버전확인~
[root@happycall var]# vi  /etc/redhat-release

커널 버전 확인
[root@happycall happycall]# uname -a
Linux happycall.co.kr 2.6.9-78.0.1.EL #1 Tue Aug 5 10:49:42 EDT 2008 i686 i686 i386 GNU/Linux

mysql 버젼 확인
[root@happycall man]# /usr/local/mysql/bin/mysql -V
/usr/local/mysql/bin/mysql  Ver 12.22 Distrib 4.0.25, for pc-linux-gnu (i686)


프로그램 실행시 메모리 체크 값입니다.
[root@happycall ~]# free -m
             total       used       free     shared    buffers     cached
Mem:           495        447         48          0         56        297
-/+ buffers/cache:         94        401
Swap:         1027          3       1024


# vi  /etc/my.cnf (mysql 설정파일 일부 입니다.)

[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
skip-name-resolve
key_buffer = 384M
max_connections = 1024
max_allowed_packet = 1M
table_cache = 1024
sort_buffer_size = 2M
read_buffer_size = 2M
myisam_sort_buffer_size = 64M
thread_cache = 8
query_cache_size = 32M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8

제가 볼때 아래 sleep 가 계속 증가하는게 문제가 아닐런지 해서요...
루트 접속후 확인결과 sleep이 계속 증가 하고 있네요..
mysql> show processlist;
+-------+-----------+-----------+-----------+---------+------+-------+------------------+
| Id    | User      | Host      | db        | Command | Time | State | Info             |
+-------+-----------+-----------+-----------+---------+------+-------+------------------+
| 10440 | root      | localhost | NULL      | Query   | 0    | NULL  | show processlist |
| 12628 | happycall | localhost | happycall | Sleep   | 1692 |       | NULL             |


그런데 happycall.co.kr.err 로그에는 별거 없는것 같은데요...

/usr/local/mysql/libexec/mysqld: ready for connections.
Version: '4.0.25-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
080919 17:28:40 /usr/local/mysql/libexec/mysqld: Normal shutdown

080919 17:28:41  InnoDB: Starting shutdown...
080919 17:28:43  InnoDB: Shutdown completed
080919 17:28:43 /usr/local/mysql/libexec/mysqld: Shutdown Complete

080919 17:28:43  mysqld ended

080919 17:29:31  mysqld started
080919 17:29:31  InnoDB: Started
/usr/local/mysql/libexec/mysqld: ready for connections.
Version: '4.0.25-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution


 
[Top]
No.
제목
작성자
작성일
조회
27800테이블 트리거 해제 및 연결상태확인 방법
호기심
2008-09-22
4078
27799데이터베이스 파일 출력 질문이요.... [1]
xptmxj
2008-09-21
3427
27798함수질문입니다 [1]
머털이
2008-09-20
4302
27797따뜻한 답변 부탁드립니다...
김군
2008-09-20
3790
27796고수님 재고에 관한 쿼리문 조언을 구하고자 합니다.
초초보
2008-09-18
3749
27795MySQL 연결시 ODBC와 VBAPI(dll) 차이점이 있나요?
김성호
2008-09-18
3974
27794리눅스 서버에 있는 MySQL을 외부에서 접속하려 합니다. [2]
김성호
2008-09-18
4310
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.018초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다