Welcome to Geeklog, Anonymous Saturday, July 20 2024 @ 06:54 pm EDT

Geeklog Forums

too many db connections -- security/performance issue


Status: offline

wfzimmerman

Forum User
Chatty
Registered: 10/24/03
Posts: 50
thoughtful
My site is getting busier and with some regularity I am seeing messages like this one:

Warning: mysql_connect(): User **foo** has already more than 'max_user_connections' active connections in /usr/home/ibic/gl139test/system/databases/mysql.class.php on line 108
Cannnot connect to DB server

Two thoughts:

1) anything I can tweak in geeklog to make this happen less often?
2) exposing the db user name & file path in an error message seems like poor security practice, any ideas?

 Quote

Status: offline

comicbookguy

Forum User
Regular Poster
Registered: 05/15/04
Posts: 97
Take a look at this thread it might help.

http://www.geeklog.net/forum/viewtopic.php?forum=3&showtopic=32519

Sign up now at PlanetDouglas.com
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by wfzimmerman: 2) exposing the db user name & file path in an error message seems like poor security practice, any ideas?

In system/databases/mysql.class.php, find the call to mysql_connect and put an @ sign in front of it:
Text Formatted Code
$this->_db = @mysql_connect(...
 

bye, Dirk
 Quote

All times are EDT. The time is now 06:54 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content