Question

Good day.

We have IIS7 and Windows Server 2008 R2

When we use php script in server we get error:

Error in query mainres enterres preparation/execution. 

Array ( 
    [0] => Array ( 
            [0] => 08S01 [SQLSTATE] => 08S01 
            [1] => 258 [code] => 258 
            [2] => [Microsoft][SQL Server Native Client 11.0]Shared Memory Provider: Timeout error [258]. [message] => [Microsoft][SQL Server Native Client 11.0]Shared Memory Provider: Timeout error [258]. 
            ) 
    [1] => Array ( 
            [0] => 08S01 [SQLSTATE] => 08S01 
            [1] => 258 [code] => 258 [2] => [Microsoft][SQL Server Native Client 11.0]Communication link failure [message] => [Microsoft][SQL Server Native Client 11.0]Communication link failure 
            ) 
    [2] => Array ( 
            [0] => 08S01 [SQLSTATE] => 08S01 
            [1] => -2147467259 [code] => -2147467259 
            [2] => [Microsoft][SQL Server Native Client 11.0]Communication link failure [message] => [Microsoft][SQL Server Native Client 11.0]Communication link failure 
            ) 
    )

As we can see Shared Memory Provider: Timeout error

Tell me please how to increase the time before timeout error ?

Was it helpful?

Solution 2

php.ini:

max_execution_time = 300
max_input_time = 300
default_socket_timeout = 300

MSSQL Server:

mssql.connect_timeout = 300
mssql.timeout = 300

IIS7:

enter image description here

P.S.: config php.ini also you can change in manager iis7

OTHER TIPS

This error may be related to the setting in your php.ini configuration file.

Search for the following items and change (INCREASE) their values, for example:

max_execution_time = 600  
max_input_time = 600
default_socket_timeout = 60

And, if you use MSSQL Server:

mssql.connect_timeout = 60
mssql.timeout = 60

If you use MySQL server:

mysql.connect_timeout = 60
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top