timeout with php-mssql connection with stunnel

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dan

    timeout with php-mssql connection with stunnel

    Hi,
    I connect to a microsoft SQL server from php. Php is running on linux
    (debian sarge) with the freetds package.
    The connection is secured through stunnel (version 3.26), with stunnel
    running locally on the web server and locally on the SQL server
    machine.
    This means php connects locally to the stunnel port, which then
    establishes a secure connection to stunnel on the sql server. There
    the data is then transmitted locally to the SQL server.

    When the SQL server machine is not responding the connection attempt
    times out with the following msg:
    Warning: mssql_connect() : Sybase: Client message: Read from SQL server
    failed. (severity 78) in /var/www/abc/utils.php on line 283
    Warning: mssql_connect() : Sybase: Client message: Login incorrect.
    (severity 78) in /var/www/abc/utils.php on line 283
    Warning: mssql_connect() : Sybase: Unable to connect in
    /var/www/abc/utils.php on line 283

    My problem is that the timeout is very high, about three minutes. I
    could not reduce this timeout with any parameter like
    mssql.connect_t imeout, mssql.timeout, not even max_execution_t ime
    would reduce this timeout.
    I also tried to reduce the freetds and stunnel timeout, no success.

    I assume that this has something to do with stunnel being used beccause
    the mssql drive recives the connection response from the local stunnel.

    Do you have any idea how I can set the timeout to a value of 10 sec. ?

    many thanks!

    Dan

Working...