0

We are using litespeed+cpanel. Everything is lightening fast but something strange started to happening today:

Let me explain it with a example: On a wordpress website (as an example it happens with any php script) when a new post is made or a new comment is created (which means insert in the database) the time it takes for the PHP to give a response back to user is 15 seconds for almost every test I have made. In the processlist I can see the process and it is sleep. As soon as it goes out of processlist the response is given to the user. I have checked that the insert in the table is instance but response time take a very long time. I cannot figure out what is going on.

Here is my.cnf

    [mysqld]
default-storage-engine=InnoDB
slow_query_log = 1
slow_query_log_file=/var/log/mysql/log-slow-queries.log
long_query_time = 10
log-error = /var/log/error.log
log-queries-not-using-indexes
max-connections = 600
max_user_connections = 300



max_allowed_packet = 512M
query_cache_size = 1000M
query_cache_limit = 1024M
thread_cache_size = 8
table_definition_cache = 8000
table_open_cache = 8000
sort_buffer_size = 2M
read_buffer_size = 1M
read_rnd_buffer_size = 8M
join_buffer_size = 128M
thread_concurrency = 8
key_buffer = 1024M

tmp_table_size = 32M
max_heap_table_size = 32M


innodb_buffer_pool_instances = 20
innodb_file_per_table=1
local-infile=0
innodb_file_format = Barracuda
innodb_sort_buffer_size = 1024M
innodb_data_home_dir = /var/lib/mysql
innodb_log_group_home_dir = /var/lib/mysql
innodb_thread_concurrency=0
innodb_flush_method=O_DIRECT
innodb_lock_wait_timeout = 120
innodb_buffer_pool_size=20G
innodb_log_file_size = 1536M
innodb_log_buffer_size = 16M
innodb_additional_mem_pool_size = 20M
innodb_read_io_threads=16
innodb_write_io_threads=16
innodb_io_capacity=500
innodb_flush_log_at_trx_commit=2
sync_binlog=100
innodb_fast_shutdown = 0

key_buffer_size = 384M
myisam_sort_buffer_size = 64M


open_files_limit=42000
[mysqldump]
quick
max_allowed_packet = 16M

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

UPDATE: The strange thin is, after submiting a post, if I wait it will take 15 seconds to show the post(refresh page) but when i submit and refresh instantly I have the post there right away.

mili
  • 11
  • 3

0 Answers0