Important: This page is using cookies (cookies). Using this website without turning off cookies in browser, means that you agree for using it.
Buy Now! Features Downloads

Earn with us!

If you would like to start earning money with vBET join to Affiliate Program.
Results 1 to 4 of 4

Thread: too many connections db error during cache update

  1. #1
    Member
    Join Date
    Oct 2009
    Posts
    67

    Default too many connections db error during cache update

    The other night I happened to be awake a little after 4 in the morning, where the forum suddenly was down for like 20 min:

    Database error in vBulletin :

    mysqli_real_connect() [<a href='function.mysqli-real-connect'>function.mysqli-real-connect</a>]: (08004/1040): Too many connections
    /var/www/vhosts/.../httpdocs/includes/class_core.php on line 1138

    MySQL Error :
    Error Number :
    Request Date : Tuesday, December 15th 2009 @ 04:28:00 AM
    Error Date : Tuesday, December 15th 2009 @ 04:28:00 AM
    Script : http://.../
    Referrer :
    IP Address :
    Username :
    Classname : vB_Database_MySQLi
    MySQL Version :
    -->
    Now, I never experienced this before, and I am wondering, if it was a coincidence, that this was around the vb cache update in scheduled tasks.

    I checked this morning and everything was ok, so it didnt repeat today.

    The server seemed not to be stressed, since I had another forum on same server without vbet, that was running fine during the downtime of my vbet forum.

    Looking at the serverlog, there did seem to be some bot activity, but not much user activity. The bots seemed to get OK 200 - but normal users got dberror. Also strangely the records in the server logfile seems not to be sorted chronologically ...

    A bit of a puzzele ... perhaps you can tell me if includes/class_core.php on line 1138 is involved in updating the cache ? Or perhaps some of you have an idea how to troubleshoot this?

  2. #2
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    3,037

    Default

    vBET does not create new connections - it can reestablish connection but this is made only if actual one is lost (in case if translations comes too late from Google). And this connection is made by $vbulletin->db->connect so vBulletin made all necessary clearing at the end.

    So at this moment we think that the issue is somewhere else.

    class_core.php is not our file and it does not use directly vBET cache - but if this file is responsible for execution of scheduled task, then it will also execute cache clearing.
    Last edited by vBET; 17-12-09 at 01:55.

  3. #3
    Michał Podbielski (vBET Staff) vBET's Avatar
    Join Date
    Oct 2009
    Posts
    3,037

    Default

    One more thing. If you are writing about vBET cache clearing, then please heck how many data you have in cache. If it is really big amount, then please change your cache clearing strategy.
    vBET does not create additional connections, but if clearing takes too long, then other clients are waiting and new connections are created by vB for new clients, which ill wait. this is why we add several clearing strategy. For really big amount of data please use last strategy.

    Please note that this issue will be minimized in 3.3.0 since we will split cache tables for each language, so your indexes will be 52 times smaller and clearing will be much faster - deleting data is fast, but updating large indexes not necessary. So at this moment please consider usage of other clearing strategy, which are better for large indexes

  4. #4
    Member
    Join Date
    Oct 2009
    Posts
    67

    Default

    Happend again from 04-05 - all domains down with too many connections. I think you are right. Forum is busy clearing the cache and search bots are tampering with one request per second. I could see serverload was extremely high. Now it is very low again. vbet db approx 1.1 GB

    I have switched to "Delete all cache data once for cache TTL interval".

    Sounds very good indeed 330 addresses this problem!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •