Foros del Web » Programando para Internet » PHP »

timeout para sql server

Estas en el tema de timeout para sql server en el foro de PHP en Foros del Web. Tengo un problemilla de timeout medio controlado pero no del todo. El problema lo tengo localizado cuando hago la llamada a una bbdd sql server ...
  #1 (permalink)  
Antiguo 01/06/2006, 05:04
 
Fecha de Ingreso: abril-2006
Mensajes: 76
Antigüedad: 18 años
Puntos: 0
timeout para sql server

Tengo un problemilla de timeout medio controlado pero no del todo.

El problema lo tengo localizado cuando hago la llamada a una bbdd sql server en un servidor externo. El problema aparece SÓLO si la consulta devuelve muuuuchos datos o el servidor tarda mucho debido a la complejidad de la consulta.

el codigo que ejecuta la consulta es:

set_time_limit( 300 );
ini_set("default_socket_timeout","600");
$this->registros = mssql_query( $comando , $this->conexion );

La configuración de apache2 en linux és:
Timeout 300

No se donde puede estar la variable que me permita cambiar el timeout..


El navegador me devuelve el siguiente texto al cabo de +-30 segundos :

Cita:
The page cannot be displayed
The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings.

--------------------------------------------------------------------------------

Please try the following:

Click the Refresh button, or try again later.

If you typed the page address in the Address bar, make sure that it is spelled correctly.

To check your connection settings, click the Tools menu, and then click Internet Options. On the Connections tab, click Settings. The settings should match those provided by your local area network (LAN) administrator or Internet service provider (ISP).
If your Network Administrator has enabled it, Microsoft Windows can examine your network and automatically discover network connection settings.
If you would like Windows to try and discover them,
click Detect Network Settings
Some sites require 128-bit connection security. Click the Help menu and then click About Internet Explorer to determine what strength security you have installed.
If you are trying to reach a secure site, make sure your Security settings can support it. Click the Tools menu, and then click Internet Options. On the Advanced tab, scroll to the Security section and check settings for SSL 2.0, SSL 3.0, TLS 1.0, PCT 1.0.
Click the Back button to try another link.



Cannot find server or DNS Error
Internet Explorer
  #2 (permalink)  
Antiguo 01/06/2006, 08:38
Avatar de claudiovega  
Fecha de Ingreso: octubre-2003
Ubicación: Puerto Montt
Mensajes: 3.667
Antigüedad: 20 años, 5 meses
Puntos: 11
En php.ini tienes el tiempo de ejecucion de un script, por defecto 30 segundos:

max_execution_time = 30

Puedes desde el script hacer esto:

ini_set("max_execution_time","n° de segundos");
  #3 (permalink)  
Antiguo 01/06/2006, 09:33
 
Fecha de Ingreso: abril-2006
Mensajes: 76
Antigüedad: 18 años
Puntos: 0
Se me ha olvidado comentar que dentro del php.ini tengo la variable max_execution_time = 330. Con esta variable y las demas que he comentado tampoco soy capaz de aguantar el timeout.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 04:25.