mikesouthern55
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Error establishing a database connectionSo, in short, remote publishing doesn’t help because a) it may be another way in for an intruder and b) it won’t alleviate the attempts to gain access elsewhere.
How about synching wordpress sites so that one effectively becomes the backend editorial centre – possibly complete on a home server – while a synched unit become the published front end, on a host but with no access at all. Synching performed at the DB level. The current problem with swamping is that The Mrs – who edits the site – can’t do her work when the site is slow or unavailable. That makes life a pain. Visitors to the site are less likely to suffer from the same impact so if I can find a way to keep the production smooth while releasing expediently to the front life will be good.
I guess I’ll search for the elsewhere in the forum. Point me links if it’s a conversation you know about.
Forum: Fixing WordPress
In reply to: Error establishing a database connectionYeah I was just reading that.
It seems a somewhat related topic; for a Mac-based WP home blogger what are the offline editors of choice? I’ve used MarsEdit. If the target is wp-login then does disabling front-end login, and uploading through the back provide a better way?
Forum: Fixing WordPress
In reply to: Error establishing a database connection@gman243 I was about to think that I knew better but I stopped myself.
I’ve had the error for nearly a year, off and on, same as many other people, but that doesn’t mean it’s not new.
After some comms with the Bluehost I rechecked a bunch of different logs over the past few days and what I found that Bluehost had applied some severe CPU throttling since about Thursday night. They also showed me a repeating error in the PHP logs – “invalid character at line x position y”. I have no idea what this is. Bad character in an RSS feed? Separate problem.
So what looks to have happened is that the site was subject to a lot of traffic – well beyond the normal 300-600 hits a day I normally get. Enough traffic to consume resources and force the CPU throttle.
It also appears that it is during this time that WordPress has difficulty connecting; not because the database is down, but possibly because it’s fighting a lot of other resources to get a connection. The database is still accessible outside of WordPress.
So I’m still watching. CPU throttling is off and has been for 15 hours, and no DB error is being received.
I should install some other CMS such as Joomla to see if that too has the same connection problem when resources are under a heavy load.
Forum: Fixing WordPress
In reply to: Error establishing a database connectionThanks for all the conversation. I am on US time. Just got up.
The URL in question is http://www.commonamericanjournal.com but I’ve received it on other wp sites also.
When I receive the error message, sometimes it just displays “Error establishing a database connection” and sometimes it displays the full explanatory verbage.
I have sought the Host support (Bluehost) and they are unable to provide any insight. Their system logs are not available to me. Their last response was “I am sorry, I am unable to replicate your issue and do not see any errors on any of your pages, sorry. If you are still experiencing issues please clear your cache and cookies and try again. If that does not work, then try a different web browser or computer. If you are still having trouble after all that, please give us step by step instructions on how to replicate the problem.” I chose Bluehost because they are supposedly one of the top 2 recommended WP hosting sites for speed and reliability.
The site originated on a Godaddy platform in 2009. The space I rented hosted many domains. In 2011 I started to experience slowness so on GD advice I relocated to one of their Grid configurations. It helped a little but wasn’t great and performance really tanked in Sept/Oct of last year. I had started to received the Database Error message since the middle of 2012. Godaddy could not resolve that problem, and could only suggest caching to improve the performance. It didn’t work and I am convinced that they had problems they could not identify so I moved to Bluehost in Dec 2012. I’ve had the Database Error three times in that timeframe. I also ran a duplicate of the site on a Fatcow host during this time, so I could size them up for performance. They didn’t resolve the speed issue and also generated the Database message.
By “three times” I mean that there have been three instances at which for a period of 12 hours or so, the message appears, then it’s OK, then returns. It’s intermittent, then I can go for weeks without seeing it. I do have a lot of RSS feeds served using KB Advanced RSS Widget but when using various performance analysis plugins they haven’t shown to degrade performance particularly.
That statement seems to point to a server host error apart from the fact that while the WP installation is down, the database is very much connectable by two other distinct sources.
Finding commonality is a problem. For example if we could say that it only happens to databases over 20Mb and where WP Super Cache is installed life would be simpler.
>”If you’re convinced that this is somehow a WordPress issue, how would you explain the connection working sometimes and not other times when it’s exactly the same code that’s in use in every case?”
No I can’t, but I didn’t write WordPress. I could make assumptions but I’ve no basis for doing that. If a connection is made for every page load request then it seems that sometimes the connection data is unavailable. The database itself, apparently, is always available.
>If this is intermittent then it’s a hardware issue. It means that the connection cannot be made between Apache and MySQL at the exact time that the connection was requested.
That’s a sane statement, to be sure. Put it in the context of being generated on sites hosted at Godaddy (Ultimate), Fatcow and Bluehost. Really? All three hosting infrastructures have this problem? I ran an Apache/MySql/PHP/Perl application on my own server – in a space completely under my control – for 7 years, serving pages and PDFs to a 5,000+ user base hitting the site at around 1200 hits a day. I never even had a server crash let alone saw this error message. Unless the database actually is offline I’ve only ever seen it in a WordPress application.
>Saying that it must be WordPress because other things work when tried close to that time is not an arguement
Well, it maya not be right, but it is an argument especially when across platforms, configurations and timeframes the only constant is WordPress itself.
>Another thing to remember is that most servers have limits on the amount of active connections that can be created to MySQL and blocks any new connections from being made … milliseconds …
And as you say this gets closer more often on a shared host. All three platforms (four if you include the work server I mentioned) use the same value. Milliseconds difference in connect time; yes. But when I get the database error, while WP shows it intermittently during the “event cycle”, the database by other connections is still available. last night I had the two environments side by side: on the right, a browser which displayed a cannot connect message persistently over a 5 minute timeframe. On the left, a PHP script calling a server-side database access script to download blog headlines and ID numbers. While the WP site error persisted, the script access was fine. That’s an event duration of 300,000 milliseconds.
The database error does not seem to be size- or hit-related. I have a very small and clumsy personal site at mike-southern.com and it too periodically suffers from the same fault. It’s still on Godaddy. Only one person a week visits that, and that’s me π
While it may eventually not be a WordPress problem I think WordPress have to own it. It is the only common factor amongst thousands(?) of instances of differing host, http server, size, usage, configuration, mysql version etc etc. I’m not impressed with the response of “go check your host logs”. By “own” it I mean WordPress user groups have to set up installations using the same commercially available environments and experience for them selves. It doesn’t happen everywhere; why not? Presumably wordpress.com and .org do not experience ut. Why not?
I think I answered the questions people asked. Thanks for your input.
Forum: Fixing WordPress
In reply to: Error establishing a database connectionno post revisions. i keep it optimised.
Forum: Fixing WordPress
In reply to: Error establishing a database connectionI just received the message again, and immediately ran a server-side script that pulled todays blog headlines from the DB and it did so instantly. I also accessed it with php-myadmin – so the database was not down and I could connect to it. That makes it a wordpress problem.
I run wordpress 3.5.1 with WP Super Cache 1.2. I optimise regularly with WP-Optimize and the wp-config file is the same now as it ever was. My host for this site is Bluehost. The database host is localhost – mainly because it IS localhost.
Reviewing my setups, there is one other factor; none of my sites have their own dedicated server. They are all shared by other customers of the host so it is possibly that periodic load gets too much. I can’t tell though.
Does anybody have a dedicated server and still get the message?
My DB is 68Mb and contains 12,000 posts. I don’t know how that relates to other wp sites – whether it’s excessive, average, or a lot smaller than a large professional site.