Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Nov 2012
    Posts
    63
    Member #
    33941
    Liked
    2 times
    Hi there,


    If my web page is repeatedly refreshed before it finishes loading then the MySQL connections do not get closed and eventually it will throw a "Too many connections error" when it exceeds 150 processes.
    I am not using a persistent connection and I have a mysql_close() at the end of the script even though I realize I do not need one as it will close.

    How can I stop this from happening? I have never experienced this before on any previous servers I have used.
    To stabilize my site I created a PHP script that every minute will kill old processes older than 120 seconds. This is helping but not when I send more traffic to my site.
    Host1Plus.com USA | UK | Germany | South Africa | Brazil | Netherlands | Lithuania | sales@host1plus.com
    Powerful VPS Hosting SSD caching | IPv4 & IPv6 | 2 free backups | DNS management | 500 Mbps uplink
    Cloud Servers - Powerful API KVM Virtualization, Windows and Linux | 1 Free Ipv4
    Reseller Hosting Unlimited domains, sub-domains, databases | Free dedicated IP

  2.  

  3. #2
    Member
    Join Date
    Jun 2012
    Location
    New York
    Posts
    55
    Member #
    31903
    Hi

    In MYSQL the number of connections permitted is controlled by the max_connections system variable in my.cnf configuration file. The default value is 151 to improve performance when MySQL is used with the Apache Web server.

    Check your my.cnf file for "max_connections". If none exist the add the below enty
    [mysqld]max_connections=250

    Then restart the mysql services

  4. #3
    Member
    Join Date
    Jun 2012
    Location
    New York
    Posts
    55
    Member #
    31903
    Is this issue fixed?

    Are you still facing the issue.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:37 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com