473,651 Members | 2,582 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Database Connection Fails

Hi, I've been having problems with my CGI script, it overloads the
server. I think it's because the database connection fails because
the following error is logged whenever the server overloads.

DBI->connect(server =localhost;data base=Employee) failed: at db.pm
line 53
db.cgi:: Could not connect to database
db.cgi:: No database connection exists
db.cgi:: No database connection exists

And I use these settings to run mysqld.

/usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr
--datadir=/var/lib/mysql --user=mysql
--pid-file=/var/run/mysqld/mysqld.pid --skip-locking

I read some documentation that skip-external-locking should be used
instead of skip-locking, but that seems like a minor thing. I'm not
entirely sure it is the database connections, I'm just trying to
eliminate possible causes. So if this is not in the right
messageboard, I apologize.

TIA,
G
Jul 19 '05 #1
4 4517

It sounds like you may have reached the maximum number of connections or
exhausted some other finite resource. Try monitoring these types of
parameters while your server is running and see what changes when the
server overloads.

John
Gloria wrote:
Hi, I've been having problems with my CGI script, it overloads the
server. I think it's because the database connection fails because
the following error is logged whenever the server overloads.

DBI->connect(server =localhost;data base=Employee) failed: at db.pm
line 53
db.cgi:: Could not connect to database
db.cgi:: No database connection exists
db.cgi:: No database connection exists

And I use these settings to run mysqld.

/usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr
--datadir=/var/lib/mysql --user=mysql
--pid-file=/var/run/mysqld/mysqld.pid --skip-locking

I read some documentation that skip-external-locking should be used
instead of skip-locking, but that seems like a minor thing. I'm not
entirely sure it is the database connections, I'm just trying to
eliminate possible causes. So if this is not in the right
messageboard, I apologize.

TIA,
G

Jul 19 '05 #2

It sounds like you may have reached the maximum number of connections or
exhausted some other finite resource. Try monitoring these types of
parameters while your server is running and see what changes when the
server overloads.

John
Gloria wrote:
Hi, I've been having problems with my CGI script, it overloads the
server. I think it's because the database connection fails because
the following error is logged whenever the server overloads.

DBI->connect(server =localhost;data base=Employee) failed: at db.pm
line 53
db.cgi:: Could not connect to database
db.cgi:: No database connection exists
db.cgi:: No database connection exists

And I use these settings to run mysqld.

/usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr
--datadir=/var/lib/mysql --user=mysql
--pid-file=/var/run/mysqld/mysqld.pid --skip-locking

I read some documentation that skip-external-locking should be used
instead of skip-locking, but that seems like a minor thing. I'm not
entirely sure it is the database connections, I'm just trying to
eliminate possible causes. So if this is not in the right
messageboard, I apologize.

TIA,
G

Jul 19 '05 #3
Thanks, I thought it might be that but I have a hard time getting into
the server when it starts to overload. Is there any type of logging
that shows current parameters?

John <no****@topleve l.tld> wrote in message news:<Ql******* ***********@new sread2.news.atl .earthlink.net> ...
It sounds like you may have reached the maximum number of connections or
exhausted some other finite resource. Try monitoring these types of
parameters while your server is running and see what changes when the
server overloads.

John
Gloria wrote:
Hi, I've been having problems with my CGI script, it overloads the
server. I think it's because the database connection fails because
the following error is logged whenever the server overloads.

DBI->connect(server =localhost;data base=Employee) failed: at db.pm
line 53
db.cgi:: Could not connect to database
db.cgi:: No database connection exists
db.cgi:: No database connection exists

And I use these settings to run mysqld.

/usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr
--datadir=/var/lib/mysql --user=mysql
--pid-file=/var/run/mysqld/mysqld.pid --skip-locking

I read some documentation that skip-external-locking should be used
instead of skip-locking, but that seems like a minor thing. I'm not
entirely sure it is the database connections, I'm just trying to
eliminate possible causes. So if this is not in the right
messageboard, I apologize.

TIA,
G

Jul 19 '05 #4
Thanks, I thought it might be that but I have a hard time getting into
the server when it starts to overload. Is there any type of logging
that shows current parameters?

John <no****@topleve l.tld> wrote in message news:<Ql******* ***********@new sread2.news.atl .earthlink.net> ...
It sounds like you may have reached the maximum number of connections or
exhausted some other finite resource. Try monitoring these types of
parameters while your server is running and see what changes when the
server overloads.

John
Gloria wrote:
Hi, I've been having problems with my CGI script, it overloads the
server. I think it's because the database connection fails because
the following error is logged whenever the server overloads.

DBI->connect(server =localhost;data base=Employee) failed: at db.pm
line 53
db.cgi:: Could not connect to database
db.cgi:: No database connection exists
db.cgi:: No database connection exists

And I use these settings to run mysqld.

/usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr
--datadir=/var/lib/mysql --user=mysql
--pid-file=/var/run/mysqld/mysqld.pid --skip-locking

I read some documentation that skip-external-locking should be used
instead of skip-locking, but that seems like a minor thing. I'm not
entirely sure it is the database connections, I'm just trying to
eliminate possible causes. So if this is not in the right
messageboard, I apologize.

TIA,
G

Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
7493
by: noah | last post by:
Does PHP have a feature to associate Cookie sessions with a persistent database connection that will allow a single transaction across multiple HTTP requests? Here is how I imagine my process: I have an series of interactive HTML forms. The user begins a Cookie session. A database connection is opened and a transaction is begun. After the user goes through any number of pages where they update the database they finish on a page where...
5
3265
by: Frank van Vugt | last post by:
Hi, I noticed that when using the single commandline: drop database <name>; create database <name>; this sometimes fails due to a pg_autovacuum process running on the background. When this happens, the error returned is:
3
3091
by: Maellic | last post by:
Hi, The website I am working on is built with ASP.NET and connects to a SQL Server 2000 database. The web server and database are on the same machine. I have recently tried to modify the timeout of the website from 20 mn to 60 mn. I changed the timeout setting in IIS. Now the website itself doesn't time out, however after 20 mn, when I try to access a page that needs to connect to the database, I get the following error message
1
1975
by: bennett | last post by:
I'm trying to write an ASPX page that uses an OleDbDataAdapter to get data from a SQL Server database. When I test the connection, it returns success, and when I preview the data using the Adapter's "preview data" right-click option, it works, but when I load the actual page, I get the error "Cannot open database requested in login 'cookiecutter'. Login fails." It seems to work when I use a pre-existing database like Northwind or...
0
7708
by: gm | last post by:
Immediately after generating the Access application from the Source Safe project I get: "-2147467259 Could not use ''; file already in use." If Access database closed and then reopened I get: "-2147467259 The database has been place in a state by user 'Admin' on machine ..... that prevents it from being opened or locked."
5
1632
by: Sam | last post by:
Hi all, I have a process which first pulls one time all application IDs from a database and stores them in a table(this process works fine everytime). I then loop through the table, one at a time, and use application id to pull details info and process it. For example, if I have 500 records in my table, then I would have to open database 500 times. Also between processing each record, my process sleep 3 seconds. The problem is that...
3
4525
by: collinsd | last post by:
I am trying to connect to a database in SQL Server Express on my PC. The SQLConnection open() method appears to work without generating any exceptions however as soon as I try to do anything to the connection such as BeginTransaction the program fails as it claims that the connection is not open! If I change the uid or password to garbage the SQLConnection Open method fails so I know the database is being read. The database is...
0
866
by: harry | last post by:
Hi, Any suggestions to solve the following please? I have two connections to sql server 2005; cn1 on default database DB1 cn2 on default database master 1. Create connection to DB1 database (cn1) 2. Restore DB1 from disk backup (cn2)
1
27079
Curtis Rutland
by: Curtis Rutland | last post by:
How To Use A Database In Your Program Part II This article is intended to extend Frinny’s excellent article: How to Use a Database in Your Program. Frinny’s article defines the basic concepts of using databases very well and is prerequisite reading for this article. Frinny’s article explains how to use a SQL Server in your program, but there are other databases as well. Some of them provide .NET connectors, but for those that don’t,...
0
8347
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8792
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8694
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6157
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5605
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4280
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2696
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1905
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1585
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.