Duplicated database causes memory error when connecting.

Zoee

Member
Sep 30, 2016
18
2
3
UK
cPanel Access Level
Root Administrator
Hi all, we are trying to copy a database on to a development URL so we can make some upgrades to a website. The website is WordPress, and whenever we copy the database (whether using WP Migrate or directly in PHPMyAdmin), then connect the website to it, the server "falls over". I've consoled in and it repeats this error every 5 seconds or so:

[357357.037375] Out of memory: Kill process 9920 (php) score 22 or sacrifice child

What's reported is much larger but I can't figure out where it starts and ends every time it loads, as it just keeps repeating itself until I can manage to restart MySQL through the WHM admin panel.

We've tested this on two Virtual Private Servers, both running CentOS 6 with 2GB RAM. I've tried cleaning up and optimising the database too, with no luck.

What's odder is the live site is absolutely fine!!

I'm not particularly seasoned at server management so any help would be much appreciated!
 

24x7server

Well-Known Member
Apr 17, 2013
1,896
91
78
India
cPanel Access Level
Root Administrator
Hi,

You can clone the website into the subdomain manually.

# mysqldump DB_name > DB_name.sql
--> DB Backup.

create the new database for the subdomain

# mysql New_DB_name < DB_name.sql
--> DB Restore.

Copy the contents as it is from main domain to subdomain..