osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

How can I have multiple users accessing DB?

This is a discussion on How can I have multiple users accessing DB? within the osCMax v2 Installation issues forums, part of the osCMax v2.0 Forums category; Hi all, I am getting a error from my server that I am accessing my database too many time per ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Installation issues

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 02-03-2007, 01:25 PM
Active Member
 
Join Date: Dec 2003
Posts: 110
Thanks: 0
Thanked 3 Times in 2 Posts
Rep Power: 5
Redeye_Joe
Default How can I have multiple users accessing DB?

Hi all, I am getting a error from my server that I am accessing my database too many time per hour, and I am not sure how to make the store use different users to access the database. I want the store to use multiple users to access the database so I wont get this error that shuts my entire store down, until I come in and make another user under cpanel, then it works again. The support guys for my server say my scripts need to user more users to access the data base, as I only get 50,000 per hour per user.... Please help!!!
thanks

Redeye_Joe
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 02-03-2007, 06:08 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,328
Thanks: 68
Thanked 322 Times in 305 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default Re: How can I have multiple users accessing DB?

Contact your host. They are the ones restricting this and it sounds kinda nuts to me. Restricting user connections... Sounds like you need a more e-commerce friendly host. Why would they penalize you for having a succesful site?

It would be much easier to work a deal with your host than to recode the entire application connection routine.
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 02-03-2007, 06:18 PM
Active Member
 
Join Date: Dec 2003
Posts: 110
Thanks: 0
Thanked 3 Times in 2 Posts
Rep Power: 5
Redeye_Joe
Default Re: How can I have multiple users accessing DB?

Yes, I agree, but I have 2 other sites with them, and never had this problem. I think something is screwy on thier end on this account, but moving to a new server is more work than just allowing more users to access, is there any code I can add to the config to allow more users?
thanks
Redeye_Joe
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 02-03-2007, 06:30 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,328
Thanks: 68
Thanked 322 Times in 305 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default Re: How can I have multiple users accessing DB?

Is the site really busy? Do you have persistent connections turned on? Did you hack in any new mods that could be making a lot of db connections?

You should not be making that many connections if the site is not that busy.

As for modifying to allow more users to connect, you would have to rewrite more than the configure php file. You would need to create a new connection routine that cycled through different users, then modify the shop to use the new routine instead of the current one. Not that easy in my opinion. You are talking about many, many, hours of recoding,testing and debugging.

It would be much easier to just lift the connection limit, or find the problem that is causing too many connections.

Not to mention you would make your shop completely incompatible with any future oscmax updates.
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 02-04-2007, 07:06 AM
Active Member
 
Join Date: Dec 2003
Posts: 110
Thanks: 0
Thanked 3 Times in 2 Posts
Rep Power: 5
Redeye_Joe
Default Re: How can I have multiple users accessing DB?

I havent moded anything that drastic, in fact it is pretty much a duplicate of another I have that has never had this problem, not as busy, but never once had this problem. I figured changing the code would be alot of work, my site is busy, but I dont think that I am getting that many hits, I am wondering if it is being caused by my banner that I use to advertise on a very busy site, which I host from my server. But it should only be bringing up my bandwidth usuage, not db queries, as it is just a .gif image, that is being pulled from my banners directory, not from the database? Or it also seems like the server isnt resetting every hour to give me my 50,000 queries.

I am going back to my server peeps, and work it out on their end, thanks
Redeye_Joe
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 03-14-2007, 04:20 AM
Lurker
 
Join Date: Mar 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
worldwide-wholesaler is on a distinguished road
Smile Re: How can I have multiple users accessing DB?

In fact I met this problem many many times before.I'm using ipowerweb as hosting.They are very terrible at all!Dont want to say more here.
This error is completely caused from hosting,due to their poor server.

However, we have two way to fix it:
1.as you said,do something to the DB user.Delete it and create again.But error will happen again and you have to do the same jobs again and again.
2.Add Multiple user to access DB.
Go to control panel to set 3 users,like "xxx1","xxx2","xxx3",must set the same password.
Edit file:catalog/include/configure.php
Find the code

define('DB_SERVER_USERNAME', 'xxx');

Change to

$DB_SERVER_USERNAME_group[] = "xxx1";
$DB_SERVER_USERNAME_group[] = "xxx2";
$DB_SERVER_USERNAME_group[] = "xxx3";
define('DB_SERVER_USERNAME', $DB_SERVER_USERNAME_group[ rand( 0, (sizeof($DB_SERVER_USERNAME_group)-1) ) ]);

I checked the site after make this change,it works fine without problem.
But after the change I haven't access DB so much,so not sure if the error you said will happen again.I also don't know if I should edit "catalog/admin/include/configure.php" also.
But I advise you should take a test,and dont forget to back up before making change.

PS.I'm using easy populate.
My site is http://worldwide-wholesaler.com
I'm doing some update,so it is down in these days.
Welcome to exchange site link!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
https when accessing Admin pages NickW osCommerce 2.2 Installation Help 1 02-09-2004 06:32 AM
accessing the page issue robin osCommerce 2.2 Installation Help 2 12-23-2003 07:50 AM
not able to install oscommers... getting stuck on accessing robin osCommerce 2.2 Installation Help 1 12-02-2003 08:11 AM
How to accreditate users? waitsee osCommerce 2.2 Modification Help 0 09-30-2003 02:22 PM


All times are GMT -8. The time now is 07:23 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax