Speed of posting replies slow - but site fast!

craigiri

Well-known member
I know we've had many discussions about speeding up our sites, but this one doesn't seem to be addressed by itself.

That is, my site is very fast - searching, listing and just clicking around.
My server load is quite low - less than 1 with a quad-core.
RAM is available - CPU use is not high.

YET, at a number of times in the last couple of days, adding replies to a thread seem quite slow. The little timer on the upper right comes on and sometimes lasts 5 seconds or longer.

Are there any hints here already - or any which folks can post here, which address possible logjams which may slow JUST that particular part of a forum - taking all of the above into account?
 
Here is the basic.
I tried uncommenting the other innodb lines, but the site (all mysql) goes down. It restarts, but throws off an error on every page.

Code:
# 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.
#
# The following options will be passed to all MySQL clients
[client]
#password    = your_password
port        = 3306
socket        = /var/lib/mysql/mysql.sock
 
# Here follows entries for some specific programs
 
# The MySQL server
[mysqld]
port        = 3306
socket        = /var/lib/mysql/mysql.sock
skip-locking
key_buffer =256M
max_allowed_packet = 1M
table_cache = 700
max_connections = 100
sort_buffer_size = 4M
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
 
skip-networking
 
# Disable Federated by default
skip-federated
 
 
# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /var/lib/mysql/
#innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
#innodb_log_group_home_dir = /var/lib/mysql/
#innodb_log_arch_dir = /var/lib/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 1100M
innodb_additional_mem_pool_size = 50MM
# 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 = 2
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 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M
 
[myisamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M
 
[mysqlhotcopy]
interactive-timeout
 
Email notifications would be my guess too. If the mail connection is laggy or failing then it only takes one "email thread watcher" to result in slow posting.

Tapatalk is another possibility if you are using that. There are reports of posting problems caused by Tapatalk:

http://xenforo.com/community/threads/upgraded-to-1-1-3-from-1-1-2-double-alerts.35861/

They say you can downgrade to an older version to fix it:

Do not disable it, just downgrade to version 1.1.4: http://tapatalk.com/files/plugin/tapatalk_xf10_1.1.4.zip
 
I did notice tapatalk throwing off a lot of errors into the log......the httpd error_log.

As mentioned above, I have removed a lot of old db's and orphaned docs...also, I have tweaked mysql cnf a bit and it seems better.

I am going to continue to monitor for errors, etc.

I don't think it is email in my case because my ISP specializes in corporate email (consulting, servers, etc.) and his internal network is very large and fast. It didn't help me to disable it.

mysql and php are interesting in that they often work fine up to an EXACT certain point of stress and traffic and then fall apart quickly, whereas my expectation is that they will slowly degrade with heavy traffic, that often is not the case.

I am also going to eventually run up against the RAM because I use the search add-on and have a decent size db. If our traffic continues to rise, I suppose I will shop carefully for the next server for larger and faster RAM and faster disk (SSD or similar) I/O.
 
Sorry to bump this but does anyone know the solution when it speeds up when emails are turned off in the config? I am getting this exact same problem, the whole site speedy other than when posting replies and it is fine when posting with them off, the same with profile posts which dont send emails out, mysqltuner has been ran and tuned as much as possible by myself and double checked by my host so it doesnt seem to be an issue with the server. Sorry to hijack this too. Thanks :)
 
Sorry to bump this but does anyone know the solution when it speeds up when emails are turned off in the config? I am getting this exact same problem, the whole site speedy other than when posting replies and it is fine when posting with them off, the same with profile posts which dont send emails out, mysqltuner has been ran and tuned as much as possible by myself and double checked by my host so it doesnt seem to be an issue with the server. Sorry to hijack this too. Thanks :)

That means your mail server is being slow or is not working. Contact your mail host or try a different mail server. Here is a guide for using Google as your SMTP server:

http://xenforo.com/community/threads/setting-up-google-as-smtp-server-for-your-xenforo.6180/
 
That means your mail server is being slow or is not working. Contact your mail host or try a different mail server. Here is a guide for using Google as your SMTP server:

http://xenforo.com/community/threads/setting-up-google-as-smtp-server-for-your-xenforo.6180/

Thanks Jake, what I did was default thread auto emails to off for everyone and let them know to opt in, the same with new registrations, it seems to have sped things up a bit doing that but I will definitely be doing that with Google, does that mean all mail handling is done through them and therefore your server wont be tied up handling the mail?
 
Top Bottom