Sophivorus
Sophivorus

Reputation: 3083

Fresh MediaWiki loading forever

I'm trying to install MediaWiki on a shared hosting. I downloaded MediaWiki 1.22.0 and runned the install without problems at all. But then when I try to visit the Main Page, it loads forever and ever. I activated the debug mode, emptied the debug.log and then loaded the Main Page until the browser had enough. I searched for the word "error" and copied the context below:

Start request GET /
HTTP HEADERS:
USER-AGENT: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;)
HOST: www.wiki.brake-caliper-painting.com
CONNECTION: keep-alive
ACCEPT-LANGUAGE: zh-cn
ACCEPT: */*
ACCEPT-ENCODING: gzip
CACHES: EmptyBagOStuff[main] SqlBagOStuff[message] SqlBagOStuff[parser]
LocalisationCache: using store LCStore_DB
Fully initialised
Query brakecal_mw19583 (1) (slave): SET /* DatabaseMysqlBase::open  */ NAMES binary
Query brakecal_mw19583 (2) (slave): SET /* DatabaseMysqlBase::open  */ sql_mode = ''
Connected to database 0 at localhost
DB connection error
Server: localhost, User: brakecal_mw19583, Password: Hx8..., error: :real_connect(): (08004/1040): Too many connections
Failed to connect to database 0 at localhost
SqlBagOStuff::markServerDown: Server #0 down until 1389404759
[SQLBagOStuff] DBError: DB connection error: Too many connections (localhost)
SqlBagOStuff::handleReadError: ignoring connection error
SqlBagOStuff::markServerDown: Server #0 already down
[SQLBagOStuff] DBError: DB connection error: Too many connections (localhost)
SqlBagOStuff::handleReadError: ignoring connection error
SqlBagOStuff::markServerDown: Server #0 already down
[SQLBagOStuff] DBError: DB connection error: Too many connections (localhost)
SqlBagOStuff::handleWriteError: ignoring connection error
SqlBagOStuff::markServerDown: Server #0 already down
[SQLBagOStuff] DBError: DB connection error: Too many connections (localhost)
SqlBagOStuff::handleReadError: ignoring connection error
SqlBagOStuff::markServerDown: Server #0 already down
[SQLBagOStuff] DBError: DB connection error: Too many connections (localhost)
SqlBagOStuff::handleReadError: ignoring connection error
SqlBagOStuff::markServerDown: Server #0 already down
[SQLBagOStuff] DBError: DB connection error: Too many connections (localhost)
SqlBagOStuff::handleWriteError: ignoring connection error
SqlBagOStuff::markServerDown: Server #0 already down
[SQLBagOStuff] DBError: DB connection error: Too many connections (localhost)
SqlBagOStuff::handleWriteError: ignoring connection error
SqlBagOStuff::markServerDown: Server #0 already down
[SQLBagOStuff] DBError: DB connection error: Too many connections (localhost)
SqlBagOStuff::handleWriteError: ignoring connection error
SqlBagOStuff::markServerDown: Server #0 already down
[SQLBagOStuff] DBError: DB connection error: Too many connections (localhost)
SqlBagOStuff::handleReadError: ignoring connection error
SqlBagOStuff::markServerDown: Server #0 already down
[SQLBagOStuff] DBError: DB connection error: Too many connections (localhost)
SqlBagOStuff::handleReadError: ignoring connection error
SqlBagOStuff::markServerDown: Server #0 already down
[SQLBagOStuff] DBError: DB connection error: Too many connections (localhost)
SqlBagOStuff::handleWriteError: ignoring connection error

Obviously too many connections, but why? Maybe because it's a shared hosting?

Upvotes: 0

Views: 289

Answers (1)

Luke Z
Luke Z

Reputation: 2409

The error means that the database cannot handle any more connections at the moment. There are many reasons this could be happening. Some common examples might be...

  • Your specific site is getting hit by a lot of traffic at the moment (e.g. a search engine crawler or just a lot of viewers), causing more simultaneous page requests than the database can handle.
  • It might be possible (and unfortunate) that the way your shared hosting is configured that multiple accounts are sharing database resources and a different site had consumed all of those resources.

There are various ways to solve or mitigate this problem that involve changing MySQL database settings (e.g. increasing the number of simultaneous connections...assuming the server can support it).

If you don't have administrative access to the database server then you will have limited if any options. Check into your hosting provider's database documentation to see if you have any options.

Upvotes: 1

Related Questions