Home > other >  The database has been overloading due to a plugin which I am not able to identify which caused my ac
The database has been overloading due to a plugin which I am not able to identify which caused my ac

Time:09-23

The system suspending your hosting due to: The u621963338_jyqqx database is overloading the MySQL server with queries like SELECT COUNT(P.ID)\n\t\t\tFROM wp_posts AS P\n\t\t\tWHERE P.post_type IN ('post', 'page', 'attachment', 'e-l

The only error I could find.

The postmeta is huge in size with consuming over 2.8gb.

CodePudding user response:

Post meta is used by most plugins out there. Mostly SEO plugins or forum plugins like bbpress etc could store large meta. ACF plugin also stores custom fields in metadata, so you have to check if you are storing very large custom fields data in database? It could be due to lots of things, pin-pointing which without access to the system is very difficult. Best would be to recreate similar environment on local server and debug.

One plugin that can help you is the enter image description here

CodePudding user response:

You could try to clean unnecessary post metadata with this kind of query :

SELECT * FROM wp_postmeta pm LEFT JOIN wp_posts wp ON wp.ID = pm.post_id WHERE wp.ID IS NULL;
DELETE pm FROM wp_postmeta pm LEFT JOIN wp_posts wp ON wp.ID = pm.post_id WHERE wp.ID IS NULL;

Don't forget to do a backup before running it. Does it help ?

  • Related