채택완료

6만 회원, 회원가입 시 너무 느려요.

관리자에서 보면 일단 db에 들어왔는데 넘어가는 화면이 너무 느립니다...

뭐가 문제일까요?ㅠㅠ

 

마지막 5.33 버전이고 php 7.2 + mariadb 입니다.

답변 6개 / 댓글 7개

채택된 답변
+20 포인트

register_result.php

기능 추가한 것이 있을까요?

 

다른 페이지에서 index.php(홈페이지)로 넘어 가는 데도 시간이 많이 걸리나요?

답변에 대한 댓글 3개

따로 추가한거 없는 순정입니다.
g5_visit 안에 몇 건이나 있는지 확인해 보세요.
g5_visit 지웠고 어제 하루동안 6500건 정도 쌓였네요

# The following options will be passed to all MySQL clients
[client]
#password       = your_password
port            = 3306
socket          = /var/lib/mysql/mysql.sock
default-character-set=utf8

# The MySQL server
[mysqld]
port            = 3306
socket          = /var/lib/mysql/mysql.sock
datadir         = /var/lib/mysql
skip-name-resolve
skip-host-cache
# skip-external-locking


key_buffer_size = 256M

max_connections = 1200
max_connect_errors = 1200
connect_timeout  = 10
#max_allowed_packet = 1M
max_allowed_packet = 32M
wait_timeout = 28800
interactive_timeout = 28800


long_query_time = 3
slow_query_log = 1
slow_query_log_file=/var/log/mysql/mysql-slow.log

#sort_buffer_size = 512K
sort_buffer_size = 8M

#new
#join_buffer_size = 8M
#bulk_insert_buffer_size = 16M
tmp_table_size = 256M
#new
#max_heap_table_size = 256M

net_buffer_length = 16K

#newly added. 2021-01
myisam_sort_buffer_size = 8M

transaction-isolation = READ-COMMITTED 

#REPEATABLE-READ

init-connect='SET NAMES utf8'
character-set-server = utf8

#newly added. 2021-01
table_open_cache = 1280
query-cache-type = 1
query_cache_size = 256M
query_cache_limit = 256M

# Bulk insert for MyISAM.
bulk_insert_buffer_size = 64M
thread_concurrency = 4

# Don't listen on a TCP/IP port at all.
skip-networking

# required unique id between 1 and 2^32 - 1
server-id       = 1

# Uncomment the following if you are using BDB tables
#bdb_cache_size = 4M
#bdb_max_lock = 10000

# InnoDB tables are now used by default
#innodb_data_home_dir = /srv/mysql
#innodb_log_group_home_dir = /srv/mysql
# All the innodb_xxx values below are the default ones:
innodb_data_file_path = ibdata1:12M:autoextend
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#inno buffer pool size = 128M, log = 48M, log buffer 16M
innodb_buffer_pool_size = 4G
innodb_log_file_size = 48M
innodb_log_buffer_size = 1M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
innodb_write_io_threads = 4
innodb_read_io_threads = 4
innodb-defragment=1

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
default-character-set=utf8
# This statement tells MySQL server to log any query that takes longer that 3 seconds.
#log_slow_queries=/var/log/mysql/log-slow-queries.log
# This statement tells MySQL server where to log the slow queries.
#log_queries_not_using_indexes=YES 
# This is an optional statement that logs queries that don’t use an index.

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

[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

# End /etc/mysql/my.cnf
 

제 마리이디비 세팅값입니다.

답변에 대한 댓글 1개

/var/log/mysql/mysql-slow.log
이 파일에서
실행 시간이 긴 것들 중에서 해당 페이지가 느린 상황에 해당할 만한 것을 찾아 보세요.

register_result.php  이후 발생하는 활동 ( sql, 파일 session 처리 등 ) 기록으로 남겨서 explain 떠보셔야 할 것 같습니다. 그누보드는 아니었지만 web service 처리가 늦는 대부분은 sql 또는 file i/o 쪽이 문제가 된 적이 많더군요.

답변에 대한 댓글 1개

회원관리 보면(g5_member 테이블을 보면) 가입은 되어 있어서 io 문제는 아닌거 같습니다.

회원 가입 페이지를 따로 때두시고 어디서 일단 시간이 걸리는지 확인을 해보셔야 할거 같습니다.

답변에 대한 댓글 1개

감사합니다 따로 하위폴더 만들어서 테스트 해보니
register_result.php 까지는 잘넘어가는데 메인으로 돌아가는데 5분정도 걸리네요 ㅠㅠ
어디서 꼬인건지 참...
sql 모니터링해보면 메인으로 돌아가기 누르는 순간 cpu가 15% 에서 70% 까지 올라가네요

g5_visit가 필요없다면

데이터를 지워 보세요.

답변에 대한 댓글 1개

서버 사양은 괜찮습니다. xeon e3 1280 v6 + 64gb ddr4 2400 ecc + 2*1tb nvme samsung 950 pro 입니다. 슬로우도 안나오는데.. 뭐가 문제일까요?ㅠㅠ 게시판도 잘 되고 로그인도 잘되는데 회원가입 테이블만 말썽이네요

답변을 작성하려면 로그인이 필요합니다.