Coonection problems

(9 posts) (2 voices)
  • Started 2 years ago by ziuras
  • Latest reply from myDBR Team


No tags yet.

  1. ziuras, Member

    Recently i migrated my MS sql server.
    And I changed in my mydbr_config.php DB_HOST to my new MS sql server.

    Now all works well except sometimes i get this error:
    Connection failed: Unable to connect to database
    re-run the installation

    Re-running the installation might resolve the problem.

    If I press F5 (reload) in browser everything is working correct.

    I tried to re-run instaliations - nothing changed.

    Posted 2 years ago #
  2. ziuras, Member

    My mydbr:
    myDBR 4.7.3 (build 3209)
    licenses - premium 4.6.6
    database MS SQL 2008R2

    Posted 2 years ago #
  3. myDBR Team, Key Master

    If you can make a connection to the database server and it just fails occasionally, re-running the installation will not help as the problem is most likely in the network / server. You seem to be using FreeTDS to connect to the server which is reliable. Occasional connection problem would point to the network problems.

    myDBR Team

    Posted 2 years ago #
  4. ziuras, Member

    Environment Prerequisites Validation
    Checking PHP Version OK
    PHP version 5.5.9-1ubuntu4.20 found.
    Checking Database PHP Extensions OK
    Extension Database Status
    mysqli MySQL Installed
    mssql/FreeTDS MS SQL Server, Sybase ASE, Sybase Anywhere Installed
    sqlsrv Microsoft Drivers for PHP for SQL Server Not installed

    You will be able to connect to:
    - MySQL
    - Microsoft SQL Server
    - Sybase ASE
    - SQL Anywhere
    Checking PHP Extensions OK
    Extension Use Status
    mbstring Required Allows to use UTF-8 Installed
    curl Recommended Used if installed Installed
    iconv Recommended Character set conversion Installed
    zip Recommended For Excel export Installed
    xml Recommended For Excel export Installed
    ldap Optional For Active Directory autentication Installed
    openssl Optional Encrypted MySQL connection Installed

    Checking file permissions OK
    /var/www/mydbr_config.php is writable.

    Posted 2 years ago #
  5. myDBR Team, Key Master

    Just to confirm that your connection does work and that the problem does not happen on every acess, but just occasionally?

    myDBR Team

    Posted 2 years ago #
  6. ziuras, Member

    yes, occasionally.
    in 10-20 clicks in mydbr only on one click i get connection failed.
    ping from linux to ms sql and mssql to linux (MS WINDOWS server 2016) good all time.
    with ms sql server always are working ~50 users (through Visual foxpro app).

    I think about ms windows server 2016, but foxpro users did not have any problems.

    Posted 2 years ago #
  7. myDBR Team, Key Master

    How does your freetds.conf file look like? Another thing that you might want to take a look is the connection limit parameters in SQL Server (the default is quite high in SQL Server though). See that the server is not rejecting connections due to configuration.

    You can reduce the likelyhood of the problem by using pooled connections with myDBR. You can turn this on by adding following line into the user/defaults.php:

    $mydbr_defaults['db_connection']['pooled_connections'] = true;

    This will not solve the actual problem, just that myDBR will make less connections and hence reduces the likelyhood that a connection will fail.

    myDBR Team

    Posted 2 years ago #
  8. ziuras, Member

    tds version = 8.0
    text size = 65536
    client charset = UTF-8
    host = litas.kmv.local
    port = 1433
    tds version = 7.2

    and pooled_connections seems helped a litle for now. :)

    Posted 2 years ago #
  9. myDBR Team, Key Master

    Nothing there that if you are using SQL Server 2008, you can use tds version 7.3. Again, will not affect the connection problem.

    If the connection problem is happening on higher load, you might want to check any limitations in your configuration (SQL Server, php.ini). Other option would be to use FreeTDS logs if additional information can be obtained.

    myDBR Team

    Posted 2 years ago #


You must log in to post.