Menu

Database has gone away - except it hasn't

Help
2021-09-10
2021-09-11
  • David Ledger

    David Ledger - 2021-09-10

    I'm running phpgedview 7312 on a Mac which has solved a lot of problems
    with the display tabs and the Tree not expanding that I reported some
    time ago.

    An intermittent problem that I now have is that on the 'Welcome Page'
    and 'MyGedView Portal' I sometimes get

    ERROR 2: PDO::__construct(): MySQL server has gone away

    but the rest of the site works fine. If I understand correctly these
    later version run from the database rather than the GEDCOM file, so the
    database hasn't gone away. Also, on the host using command line I can
    open a connection to the database and see the data.

    It's only those two pages, and sometimes some of the panes work and some
    don't, those that don't giving that same errors.

    Two sample stack traces:

    ERROR 2: PDO::__construct(): MySQL server has gone away
    0 Error occurred on in function __construct
    1 called from line 119 of file class_pgv_db.php in function createInstance
    2 called from line 402 of file session.php in function require_once
    3 called from line 83 of file config.php in function require
    4 called from line 35 of file index.php

    and

    Fatal error: DB connection error in PGV_DB::createInstance():
    SQLSTATE[HY000] [2006] MySQL server has gone away in
    /Library/WebServer/Documents/phpgedview7312/includes/classes/class_pgv_db.php
    on line 405

    Regards,
    David

    David Ledger

     
  • Gerry Kroll

    Gerry Kroll - 2021-09-11

    Nope, the code in PhpGedView is consistent in the way it uses the database. It could be the number of concurrent connections.

    One thing that I noticed, 'way back when, was that if the database tables use the innodb engine, PhpGedView is EXTREMELY slow when importing a GEDCOM file. I haven't bothered to track this down; I think it has something to do with the program not releasing record locks properly.

     

Log in to post a comment.