Load problem - Help with server / xenforo optimization

Those 4-5 are probably the default MyISAM ones that XenForo uses. I just set mine to default to InnoDB to be on the safe side. Should not REALLY effect anything unless you are running other forum or packages that don't specify.
I'm not a mySQL expert, so I'm not really going to be much help on that. My my.conf wouldn't help you out as I'm running on a dedicated 24GB machine and the one forum is the only thing running on it so the resource allocation I give to it is high.
 
Dakis, your my.cnf completely lacks Innodb optimization. Your forum will suffer from heavy IO.

Please add this line to the [mysqld] part:
innodb_buffer_pool_size=1000M
innodb_flush_method=O_DIRECT

As you said you have 8 GB RAM, I have dedicated 1 GB to Innodb.
After that, restart Mysql and watch the load for a day or two. The load should be much lower and the forum faster.

And greetings to beautiful Greece!
 
Sorry for the delay, im on holidays, @Walter give to you a correct configuration, this is a little more complete, but you can try for a week with the @Walter config and see if the server go better.

Code:
innodb_flush_method  = O_DIRECT
innodb_log_files_in_group  = 2
innodb_log_file_size  = 128M
innodb_flush_log_at_trx_commit = 2
innodb_file_per_table  = 1
innodb_buffer_pool_size  = 1G
 
Thanks mate, I'll wait for a few days to see how the other thing goes, and then I'll try this too.
 
My load is skyrocketing again right now :(

I don't understand what's happening :(
Enter via SSH run a top -c and see what process is eating you memory and cpu.
You have apache ?? your php is compiled as apache module ?? many times one php-apache child process is blocked and apache start to eat all available memory.
 
This is a screenshot from my process manager, can anyone help me out figure out what's causing this? My site is unusable :(

2.webp
 
This is a screenshot from my process manager, can anyone help me out figure out what's causing this? My site is unusable :(

View attachment 51876

How many cores and what type of CPU have your server ?? i think that is not a problem with memory. Please install xCache or APC to aliviate this a little.
Check if in xenforo options, Performance, you have activated "Minify CSS", please disable it and enable Fetch public templates as files. You have enable search engine for guests ?? try disable completly the "Search Engine" to see if your load down.
I need to see your httpd.conf and php.ini.
How many people is visiting your page right now ??
 
@Walter I have restarted mysql after the my.cnf change you proposed.

@dbembibre it's an 8-core 8-gb ram system.

I can't install xcache or apc this week unfortunately, my main technical contact in my hoster is away and he will be back next week.

the Minify CSS is disabled.

The Fetch public templates as files option says that I need to have some caching installed, which I don't think I have, so I've left it disabled.

How can I retrieve the httpd.conf and php.ini files?

There should be around 400 people online now
 
Also here is the my.cnf for @Walter :

[mysqld]
max_allowed_packet=64M
tmp_table_size=512M
table_open_cache=1024
read_rnd_buffer_size=2M
skip_external_locking
skip_networking
query_cache_size=128M
innodb_file_per_table=1
long_query_time=2
max_user_connections=100
default-storage-engine=MyISAM
local_infile=0
server_id=1
open_files_limit=8192
max_heap_table_size=512M
read_buffer_size=2M
thread_cache_size=256
max_connect_errors=20
sort_buffer_size=2M
join_buffer_size=2M
collation_server=utf8_general_ci
key_buffer_size=512M
query_cache_limit=1M
max_connections=400
connect_timeout=100
datadir="/var/lib/mysql"
interactive_timeout=100
table_definition_cache=1024
wait_timeout=100
slow_query_log_file="/var/log/mysql-slow-queries.log"
myisam_sort_buffer_size=64M
character_set_server=utf8
query_cache_type=1
slow_query_log=1
innodb_buffer_pool_size=1000M
innodb_flush_method=O_DIRECT

[isamchk]
sort_buffer_size=256M
read_buffer_size=64M
write_buffer_size=64M
key_buffer_size=256M
[mysqlhotcopy]
interactive_timeout
[mysql]
no-auto-rehash
[mysqldump]
max_allowed_packet=64M
[myisamchk]
sort_buffer_size=256M
read_buffer_size=64M
write_buffer_size=64M
key_buffer_size=256M
 
You can found you apache settings in /etc/httpd/conf/httpd.conf i think.
Im interested in this lines:
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 175
MaxRequestsPerChild 0
</IfModule>

With low setting in Min and maxspare servers apache take a lot of time spawning new ones, this is translated in more cpu usage, for example is you have MaxRequesPerChild 0 apache always grow in memory but never shrinks.

Other things can be a slowloris attack, take a look to http://docs.cpanel.net/twiki/bin/view/EasyApache/Apache/SlowlorisAttacks

You need to talk with your support staff, to comment all this things and they need to investigate the logs to see whats the problem. Tell to your hoster support if can move to fastcgi too.
 
@dbembibre I don't see that specific setting, only similar setting i see is this:

<IfModule prefork.c>
MinSpareServers 8
MaxSpareServers 24
</IfModule>


<IfModule prefork.c>
Mutex default mpm-accept

</IfModule>
 
This is crazy! I've got threads that open up just fine, and threads that never load, like this one:

http://www.travelstories.gr/community/threads/Ταϋλάνδη-σε-10-μέρες-Τρέχουμε-τώρα.27956/

I don't understand what could possibly be wrong :(


Hello,

I have this error :

Fatal error: Method XenForo_Template_Public::__toString() must not throw an exception in /home/travelst/public_html/community/library/Asp/OnlineStatus/Plugin/Plugin.php on line 0
 
That's the online status ribbon plugin, I've disabled it, but the thread still doesn't load (and besides, this plugin is active in all threads not just that one)
 
I navigate ten minutes in your forum open threads and have a acceptable performance, you can play with apache timeouts, but i think that your server need a deep investigation because is dificult to say whats the problem without stay inside the server. Can you do a tail -f /var/log/httpd/error_log and see whats erros are logged ?

Please read this tutorial to find the adequate params for you.

http://www.hosting.com/support/linux/tuning-the-apache-prefork-mpm

Suggested additional timeouts and params.

KeepAlive On
MaxKeepAliveRequests 200
KeepAliveTimeout 5
MaxRequestsPerChild 1000
 
Yes you get acceptable performance but can you get this thread for example?

http://www.travelstories.gr/community/threads/Ταϋλάνδη-σε-10-μέρες-Τρέχουμε-τώρα.27956/

Also, I'm in my WHM now, which error log do you want me to post? in the apache error_log i don't see much going on there.


Not as @Jarod say i see the a php error, the plugin error is:

Fatal error: Method XenForo_Template_Public::__toString() must not throw an exception in /home/travelst/public_html/community/library/TableOfContents/Listener.php on line 0
 
Top Bottom