Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Disable pconnect system wide

  1. #1
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,634
    Blog Entries
    5

    Default Disable pconnect system wide

    To disable the annoying pconnects system wide , without having to do any code changes, just edit your php.ini file, and restart apache.

    Set this section in php.ini to:

    Code:
    [MySQL]
    ; Allow or prevent persistent links.
    mysql.allow_persistent = Off
    It will not break any scripts - they just automatically fall back to plain connects.

    Smoge
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

  2. #2
    zonebase
    Guest

    Default

    Sorry for asking but could you describe it a little bit more for a newbie like me. Is there any connection by any means with log out problem ..

    Zonebase

  3. #3
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,634
    Blog Entries
    5

    Default

    Hi,

    No - a "logout problem" would be a "cookie problem".

    Pconnect is persistant connections - between the application and mySQL.

    On some servers, the way aeDating is coded, causes persistant connections to use up all available connections to the mySQL server - and make the system unavailable (more or less, crash).

    Turning off pconnect fixes this, and is perhaps recommended if your webserver (apache) and database server (mysql) are on the same server. If your database is on a different server - you may wish to not disable pconnect.

    Smoge
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

  4. #4
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,634
    Blog Entries
    5

    Default

    Quote Originally Posted by TruckerJeff
    what are the goods and bads on disabling this on a dedicated server just for your aedating site?
    Well - I see really no bad if your web server and mysql server are on the same server.... most importantly - it stops the "too many connections" problem that seems to be a ongoing problem with aeDating (i think db.inc.php could use a re-write).

    So like, what will happen if i leave it on?, What will happen if i disable it?
    Your aedating will use pconnect (and other applications), and possibly, if your my.cnf file is not configured correclty (max connections) or if you have lots of online users - you will crash.

    Turn it off - well - all good. (see above).

    I have yet to get any errors but usually the most i have for now on the site is 30 to 50 concurrent logins at once. So i want to know if this will fix some future errors when connections get higher? Though this may fix errors does it slow things down?
    Sounds like your my.cnf is set with a high number of connections (good) - is it slower or faster? I think the difference is small, when apache and mysql on same server. Big fear is running out of connections - and you can see whats up with that by running some mysql stats on your server - and see how many connections are sleeping and orphaned.


    also SSH how do i edit the php.ini?
    SSH in... do a

    locate -u
    locate php.ini

    then edit php.ini with nano or vi or something... make a backup first..

    For changes to apply, you need to restart apache.

    Rob
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

  5. #5
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,634
    Blog Entries
    5

    Default

    phpinfo will tell you this information - which php.ini file is in use.

    Create phpinfo.php and then run it from your web browser:

    Code:
    <?php
    phpinfo();
    ?>
    Smoge
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

  6. #6
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,634
    Blog Entries
    5

    Default

    SSH is easier than FTP... if you use www.bitvise.com and their "tunneler" application...

    With this, you could sFTP it down, edit - upload.

    Then restart apache.

    Rob
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

  7. #7
    ijk
    ijk is offline

    Join Date
    Apr 2005
    Posts
    340

    Default hi jeff

    I use cuteftp pro.........................
    much easier.
    also once you know the path by using the php info file of your php.ini you right click on it and click edit and edit it like a word document.

    or download the file on your computer and edit and just replace it .
    AE Version 4.0 IQ

  8. #8
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,634
    Blog Entries
    5

    Default

    ftp is not secure (unless you take steps to encrypt your passwords).... while using SSH is. Same reason why most servers disable telnet - unsecure passwords.

    Depends on how much you worry about this.... not a big deal in most cases I guess.

    Smoge
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

  9. #9
    ijk
    ijk is offline

    Join Date
    Apr 2005
    Posts
    340

    Default hi

    Thought I would just mention cuteftp pro has a list of ways you can connect. Including ssh.
    I use SSH2 Which is even more secure than ssh. You can also use it to connect via https etc and select the encryption you want to use and make it as secure as you want. Certainly can be made more secure than putty.
    AE Version 4.0 IQ

  10. #10
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,634
    Blog Entries
    5

    Default

    If you can not disable system wide in php.ini or by using a local php.ini file, you can try this:

    Edit your db.inc.php file, and look for:

    Code:
    mysql_pconnect
    and change to

    Code:
    mysql_connect
    Be sure to test afterwards.

    Rob
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. how to disable ...
    By psycho in forum General Issues, Comments, Questions
    Replies: 3
    Last Post: 04-30-2007, 05:07 PM
  2. Replies: 1
    Last Post: 04-03-2007, 06:54 PM
  3. AEDating phpBB mod not showing up/pconnect issue
    By CiarraRose in forum General Troubleshooting
    Replies: 8
    Last Post: 12-12-2006, 12:09 PM
  4. pconnect talk
    By raeyo in forum Database
    Replies: 7
    Last Post: 10-06-2006, 11:18 AM
  5. Script Wide pconnect errors
    By mtaborn in forum Database
    Replies: 4
    Last Post: 08-09-2006, 11:03 AM

Bookmarks

Posting Permissions

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