• Welcome to PHPVIBE Forums. Please log in.

Can we change db user to avoid exceeding the db max_questions limit on our hosts

Started by YoSethos,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

YoSethosTopic starter

Hi there,

I have created a large website based on phpvibe.com and, believe it or not, it is a coloring pages website, heavily modified by myself.
You can check it here : www.kizicolor.com

My host has a db max_questions limit of 75000. I have created multiple database users for the same database.
What I want to ask you is this: how can I modify the vibe_config.php file in order to change the username based on an array of usernames every 45 minutes, to say ?

I found this code on a website but I don't really know how to modify it for the vibe_config file...
$dbusers =array (
  0 => array(
    'username' => 'user1',
    'password' => 'user1'
  ),
  1 => array(
    'username' => 'user2',
    'password' => 'user2'
  )
  );
  $dbindex =array_rand($dbusers);

$databases['default']['default'] = array (
  'database' => 'mydb',
  'username' => $dbusers[$dbindex]['username'],
  'password' => $dbusers[$dbindex]['password'],
  'prefix' => '',
  'host' => 'localhost',
  'port' => '3306',
  'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
  'driver' => 'mysql',
);

What I want is to distribute the database connections within an hour to at least 2 usernames so that I avoid my website going down due to exceeding the max_questions limits my hosting has...

Thank you
  •  

 

Similar topics (7)

[ Video Sharing CMS v4 ] User Signup Form

Started by awsjulio


Replies: 4
Views: 1230

[ Video Sharing CMS v4 ] Videos Limit - HomePage Builder

Started by imranw


Replies: 4
Views: 1141

[ Video Sharing CMS v4 ] Playlists limit

Started by matrak


Replies: 1
Views: 941

[ Video Sharing CMS v4 ] Add a download button for stored videos to logged in users

Started by Marius P.


Replies: 15
Views: 2010

[ Video Sharing CMS v4 ] Change the background of the

Started by rash


Replies: 3
Views: 1063

Comments in User Section not creating linking in Admin Section

Started by spirog


Replies: 1
Views: 1362

[ Video Sharing CMS v4 ] Limitation for sharing

Started by ollipaust


Replies: 3
Views: 915