• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Website crashing ever since xenforo install. Possible causes?

andrewkm

Active member
#1
Ever since we installed xenforo we have had some serious issues with our site hanging completely until a vm restart is done.

Previous issue thread:http://xenforo.com/community/threads/website-issues-session-table-problems.39022/#post-430754
Increased tmp partition -> 2GB
If you have any information regarding above thread please let me know.

Anyways onto this problem. Regarding server hanging untill a vm restart is done; and all is well again.
While it was hanging a noticed this in ram usage: http://i.imgur.com/SHr8m.png

After a VM reboot all was well; website was once again up and working as it should (Untill next time - happens once a day-two)

After reboot ram usage: http://i.imgur.com/OpMdS.png

Also noticed this after reboot when checking xenforo logs:
http://i.imgur.com/f6GQW.png
(im assuming its something to do with the mysql connections loses since thats when site started to go down) - Unless the other errors have something to do with it; please shed some light on this topic.

Really needing help :) Thanks for any and all responses.
Info regarding VPS if needed:
(2GB ram, 25GB storage, 2vcpus, only xenforo and a media wiki is on the vm nothing more)
 

Insy

Well-known member
#2
You must have a misconfiguration of MySQL that causes to crash your vm. I recommend you to optimize the MySQL setup, increase the number of open files if needed before accusing XenForo ;)
 

Walter

Well-known member
#3
How many memory have you given to Mysql? It's probably the best to post your My.cnf file...

Maybe Mysql is eating up all RAM until the VM is killed?
 

andrewkm

Active member
#4
You must have a misconfiguration of MySQL that causes to crash your vm. I recommend you to optimize the MySQL setup, increase the number of open files if needed before accusing XenForo ;)
Not accusing; just highly confused and new to xen :( (Sorry) - Thanks for the advice I shall look into it; anywhere you recommend starting regarding options to change?
 

andrewkm

Active member
#5
How many memory have you given to Mysql? It's probably the best to post your My.cnf file...

Maybe Mysql is eating up all RAM until the VM is killed?
[mysqld]
set-variable = max_connections=500
log-slow-queries
safe-show-database

query_cache_type=1
query_cache_limit=1M
query_cache_size=256M
key_buffer_size=256M
thread_cache_size=6
table_cache=1024
tmp_table_size=64M
max_heap_table_size=64M
 

Walter

Well-known member
#8
Exactly as I thought. Mysql will use more RAM than you have in your VM :)

First thing to do is to reduce the max_connections now. I highly doubt you really need 500 connections. A Mysql connection is not the same as a user online :)
For a normal forum 100 should be enough for a long time.

Next thing is to enable Innodb caching, this will make your forum a lot faster :)
Just add

innodb_buffer_pool_size=100M

This will add 100MB buffer for Innodb.
 

andrewkm

Active member
#9
Exactly as I thought. Mysql will use more RAM than you have in your VM :)

First thing to do is to reduce the max_connections now. I highly doubt you really need 500 connections. A Mysql connection is not the same as a user online :)
For a normal forum 100 should be enough for a long time.

Next thing is to enable Innodb caching, this will make your forum a lot faster :)
Just add

innodb_buffer_pool_size=100M

This will add 100MB buffer for Innodb.
Thanks for all the wonderful advice :) Applying all these changes now.
Also in the report I see it asks me to run OPTIMIZE TABLE -> should I do this through phpmyadmin on the entire xen database? Would it be safe to do so?
 

Walter

Well-known member
#11
Thanks for all the wonderful advice :) Applying all these changes now.
Report back the outcome. But should help tremendously.

Also in the report I see it asks me to run OPTIMIZE TABLE -> should I do this through phpmyadmin on the entire xen database? Would it be safe to do so?
Thats a good idea from time to time but not urgently needed. And before you optimize the tables, I highly recommend a) closing the forum and b) making a backup of the complete database.
 

andrewkm

Active member
#12
Report back the outcome. But should help tremendously.



Thats a good idea from time to time but not urgently needed. And before you optimize the tables, I highly recommend a) closing the forum and b) making a backup of the complete database.
Alright ran optimize; looks like all went fine.
I will report back in this thread if crashing/etc continues :)
 

andrewkm

Active member
#13
Report back the outcome. But should help tremendously.



Thats a good idea from time to time but not urgently needed. And before you optimize the tables, I highly recommend a) closing the forum and b) making a backup of the complete database.
Hey walter have a question for you.
My WHM has an option to upgrade mysql from 5.1 to 5.5
Would doing so be safe/unsafe for xenforo? (I have heard great things regarding performance and mysql 5.5 when compared to 5.1)
* Of course I shall do full backups before doing so.
 

Insy

Well-known member
#14
Would doing so be safe/unsafe for xenforo? (I have heard great things regarding performance and mysql 5.5 when compared to 5.1)
I use XenForo with MySQL 5.5 and CPanel with no issue. But this does not dispense yourself to optimize your MySQL configuration once upgraded ;)