1
shivaji
What is there in line 34 of databasefactory.php ?
  • 2004/11/29 17:26

  • shivaji

  • Friend of XOOPS

  • Posts: 179

  • Since: 2003/9/18


This page cannot be displayed due to an internal error...

Error [Xoops]: Unable to connect to database in file class/database/databasefactory.php line 34


This becomes a very common error for XOOPS site. We hosted our website with RackSpace and even mainfile.php is perfectly okay.

I realised that this error is not relate to any particular XOOPS version becuse I got this similar error in XOOPS 2.05 and even in latest version. I found, it mainly occurs when there are too many user visitors surfing our website at same time.

is it a bugs or its a bandwith problem of our web server? what is there in line 34 of databasefactory.php ?

2
hervet
Re: What is there in line 34 of databasefactory.php ?
  • 2004/11/29 18:27

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


Hi,

Do you use MySQL persistent connections or do you have a limit of connections ?

Bye,
Hervé

3
Mithrandir
Re: What is there in line 34 of databasefactory.php ?

Quote:
what is there in line 34 of databasefactory.php ?

This:
33: if (!$instance->connect()) {
34:     trigger_error("Unable to connect to database"E_USER_ERROR);
35: }

I.e if the database cannot be connected to, it throws this error.

As you say yourself:
Quote:
I found, it mainly occurs when there are too many user visitors surfing our website at same time.
Which really is not all that surprising

4
shivaji
Re: What is there in line 34 of databasefactory.php ?
  • 2004/11/30 3:13

  • shivaji

  • Friend of XOOPS

  • Posts: 179

  • Since: 2003/9/18


Quote:

hervet wrote:
Hi,
Do you use MySQL persistent connections or do you have a limit of connections ?
Bye,
Hervé


Herve,

Persistent connection is off :

// Use persistent connection? (Yes=1 No=0)
// Default is 'Yes'. Choose 'Yes' if you are unsure.
define('XOOPS_DB_PCONNECT', 0);

5
shivaji
Re: What is there in line 34 of databasefactory.php ?
  • 2004/11/30 3:47

  • shivaji

  • Friend of XOOPS

  • Posts: 179

  • Since: 2003/9/18


Quote:

Mithrandir wrote:
Which really is not all that surprising


Yes it is. We have active forum with 27,000 members, and on average sometime 100+ users use IPBM forum at same time. We have Bandwidth of 200GB/month, Apache 2.0, Memory : 1GB DDR RAM, Hard Drive 1 : 80GB EIDE, Operating System : Red Hat Enterprise Linux ES 3, Processor : Single AMD Athlon XP 2600+ 2.133 GHz., MySQL 3.23.58-2.3, webalizer 2.01_10-15.ent, php 4.3.2-14.ent.

Xoops persistent connection is off. What I am asking, is it a problem of MySQL that it can not take more queries and crash. What is the reason behind that ? I have never seen xoops.org website having this problem with a massive users surfing website at same time.

FYI, this strange error comes, reamins there for maxium 1-2 minute on average, and again evrything get normaal and site become LIVE. This occurs 2-4 times a day during pick hours.

6
brash
Re: What is there in line 34 of databasefactory.php ?
  • 2004/11/30 4:06

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


Is the webserver and database hosted on the same server? Do you have FULL control of you environment, or do you have some restrictions? The first place I'd be looking is at your server, as it'll hold all the clues. See if you can track CPU/ I/O and RAM usage over your peak periods.

7
shivaji
Re: What is there in line 34 of databasefactory.php ?
  • 2004/11/30 4:16

  • shivaji

  • Friend of XOOPS

  • Posts: 179

  • Since: 2003/9/18


Is the webserver and database hosted on the same server?

REPLY: Yes, I already open a ticket at rackspace.com for that to know. Its a good question, I will get back to you.

Do you have FULL control of you environment, or do you have some restrictions?

REPLY: We appointed Freelancer from US recommended by RackSpace to manage our PLESK CP, DB, Backup and Server. Jim has full rights and access to environment.

The first place I'd be looking is at your server, as it'll hold all the clues. See if you can track CPU/ I/O and RAM usage over your peak periods.

REPLY: Can I PM You ?

8
brash
Re: What is there in line 34 of databasefactory.php ?
  • 2004/11/30 4:29

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


PM away . Must warn you though that my background is Windows, so I may be of limited use to you for diagnosing Red Hat configuration issues.

9
hervet
Re: What is there in line 34 of databasefactory.php ?
  • 2004/11/30 6:16

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


IPB must use too much queries

10
shivaji
Re: What is there in line 34 of databasefactory.php ?
  • 2004/11/30 6:45

  • shivaji

  • Friend of XOOPS

  • Posts: 179

  • Since: 2003/9/18


Is the webserver and database hosted on the same server?

REPLY: Yes. Its in same place. Now I make persistent connection to 1.

Login

Who's Online

364 user(s) are online (243 user(s) are browsing Support Forums)


Members: 0


Guests: 364


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits