Error establishing a database connection
-
Hi there,
in normal operation of a wordpress site I have now experienced the second time the “Error establishing a database connection” error.
The wordpress site is then offline and could only be brought back alive by the support of the hosting service.
In both cases I was told that this was due to some stuck database requests (code from the first incident copied below).
Before the above mentioned error occurs commands on the admin pretty link page were slow and partly not responding at all.
How to avoid this issue in future?
Code causing the error
SELECT cl.*, (SELECT count(*) FROM wp_prli_clicks cl2 WHERE cl2.ip = cl.ip) as ip_count, (SELECT count(*) FROM wp_prli_clicks cl3 WHERE cl3.vuid = cl.vuid) as vuid_count, li.name as link_name FROM wp_prli_clicks cl, wp_prli_links li WHERE li.id = cl.link_id AND cl.created_at BETWEEN ‘2016-7-30 00:00:00’ AND ‘2016-8-29 23:59:59’ ORDER BY cl.created_at DESC LIMIT 0,10
- The topic ‘Error establishing a database connection’ is closed to new replies.