This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

wordpress DB connection error
#1
wordpress DB connection error
Hello, I am a novice of Sentora.

Too frequently I encountered the message "DB connection error"
I can't find method for fixing this severe problems...

I had to resolve temporary this problems by rebooting VPS, but... feel so bad... ^_^;;;;;
--------------------------
I started Sentora on VPS(ubuntu 14.04 + PHP + mysql), and using several wordpress sites(not multisite, just several independent domains).

The detailed system configuration is as follows.


### WordPress Environment ###

Home URL: http://xweb.kr
Site URL: http://xweb.kr
WP Version: 4.2.2
WP Multisite: –
WP Memory Limit: 128 MBYour current memory limit is sufficient
but if you need to import classic demo content
the required memory limit is 256MB.

WP Debug Mode: –
Language: ko_KR

### Server Environment ###

Server Info: Apache
PHP Version: 5.5.9-1ubuntu4.9
PHP Post Max Size: 100 MB
PHP Time Limit: 300
PHP Max Input Vars: 6000 - Recommended Value: 9000.Max input vars limitation will truncate POST data such as menus. See: Increasing max input vars limit.
SUHOSIN Installed:
Suhosin Post Max Vars: 6000 - Recommended Value: 9000.Max input vars limitation will truncate POST data such as menus. See: Increasing max input vars limit.
Suhosin Request Max Vars: 6000 - Recommended Value: 9000.Max input vars limitation will truncate POST data such as menus. See: Increasing max input vars limit.
ZipArchive:
MySQL Version: 5.5.43
Max Upload Size: 100 MB
Default Timezone is UTC:

### Active Plugins (6) ###

Duplicator: by LifeInTheGrid – 0.5.22
Fusion Core: by ThemeFusion – 1.7.3
Jetpack by WordPress.com: by Automattic – 3.5.3
WordPress SEO: by Team Yoast – 2.1.1
WordPress Social Stream: by Lee Chestnutt – 1.5.12
WP Super Cache: by Automattic – 1.4.4
Reply
Thanks given by:
#2
RE: wordpress DB connection error
Hello skyxing,

You can be running out of RAM making MySQL crash and causing the DB Connection Error.

What are your VPS Specs?

Please post more information regarding your MySQL, verify if the MySQL Server is not crashing and post the crash logs if it is crashing.

Regarding WordPress, if your theme is requesting 256mb of memory... it can be easily the cause of running out of RAM (you say you have more WP sites).

Also, check this thread: http://forums.sentora.org/showthread.php...ight=mysql
My Sentora Resources
[Module] Mail Quota Count | Vagrant Box with Sentora

[Image: vanguardly-logo-micro.png]
Graphic and Web Design. Development.
www.vanguardly.com


Reply
Thanks given by: skyxing
#3
RE: wordpress DB connection error
Maybe install htop if you want to see the ram and cpu usages. We also use it on our servers here to follow the processes and fix things with it like this.

http://hisham.hm/htop/index.php?page=main
Use for ubuntu
Code:
apt-get install htop
And then start with
Code:
htop
[Image: 4d5dc5c4c2abb76e19151054c82e2376.jpg]
Miku is here
Reply
Thanks given by: skyxing
#4
RE: wordpress DB connection error
Also check your disk space.
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#5
RE: wordpress DB connection error
(06-16-2015, 11:20 PM)apinto Wrote: Hello @[skyxing],

You can be running out of RAM making MySQL crash and causing the DB Connection Error.

What are your VPS Specs?

Please post more information regarding your MySQL, verify if the MySQL Server is not crashing and post the crash logs if it is crashing.

Regarding WordPress, if your theme is requesting 256mb of memory... it can be easily the cause of running out of RAM (you say you have more WP sites).

Also, check this thread: http://forums.sentora.org/showthread.php...ight=mysql

Thank you for your kind reply,
May I receive your another kindness?

I checked my resources by htop(knew owing to another kind guide) as follows. 

[Image: K-1.png]

Also it seems my VPS(2CPU, 1GB ram) has no swap memory. is it right? or good?
sorry I am also a novice in Server Management...

I think... I have a problem(my web sites are very slow after installing more than 8 wordpress sites in one VPS(1GB ram)... 

And i don't know wy there are so many mySQLs over than the number of wordpress sites...
Reply
Thanks given by:
#6
RE: wordpress DB connection error
If I was you I should upgrade the ram to maybe 2gb, because I think there aren't a lot of users online and you already use a lot of ram.
[Image: 4d5dc5c4c2abb76e19151054c82e2376.jpg]
Miku is here
Reply
Thanks given by:
#7
RE: wordpress DB connection error
It is normal to not have any swap file under Linux systems, it all depends on the system usage itself, I would not worry about it.

1gb ram should be enough for more than 10 WordPress websites, the issue here is that each of those websites is requesting a LOT of ram. My WordPress websites (some with big amounts of data) just need 64mb, your theme requests 256... something is bad coded/bloated there.

Looking at your htop results your server needs more ram or oyu need to optimize it.

Look at this guide: http://www.narga.net/optimizing-apacheph...ry-server/
Keep in mind that this is not for Sentora, not even for a shared hosting environment, read the article, understand it and tweak the values to YOUR NEEDS, do no tjust copy paste what they say.
Also I would recommend testing and learning a bit more about this Smile

Hope this helps.
My Sentora Resources
[Module] Mail Quota Count | Vagrant Box with Sentora

[Image: vanguardly-logo-micro.png]
Graphic and Web Design. Development.
www.vanguardly.com


Reply
Thanks given by: skyxing
#8
RE: wordpress DB connection error
(06-18-2015, 12:59 AM)apinto Wrote: It is normal to not have any swap file under Linux systems, it all depends on the system usage itself, I would not worry about it.

1gb ram should be enough for more than 10 WordPress websites, the issue here is that each of those websites is requesting a LOT of ram. My WordPress websites (some with big amounts of data) just need 64mb, your theme requests 256... something is bad coded/bloated there.

Looking at your htop results your server needs more ram or oyu need to optimize it.

Look at this guide: http://www.narga.net/optimizing-apacheph...ry-server/
Keep in mind that this is not for Sentora, not even for a shared hosting environment, read the article, understand it and tweak the values to YOUR NEEDS, do no tjust copy paste what they say.
Also I would recommend testing and learning a bit more about this Smile

Hope this helps.

very helpful advice and,  agree and love your pointing out.
I will try to hear what you say~ 

throw your on going advice into bluegood@gmail.com  Rolleyes
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
Repo update error hostingms 3 6 ,809 02-14-2024, 09:20 AM
Last Post: TGates
apt-get install mod_ssl ERROR CMs222 9 28 ,323 11-11-2022, 09:14 PM
Last Post: zustudios
Sentora debug and error files johnnyp 0 1 ,590 10-27-2022, 06:16 PM
Last Post: johnnyp

Forum Jump:


Users browsing this thread: 4 Guest(s)