Ir para conteúdo

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

razs

Limite da Memória Intermédia de Resposta excedido

Recommended Posts

Boas, tenho esta pagina que me da Limite da Memória Intermédia de Resposta excedido, já verifiquei tudo e nao percebo de onde vem, alguem consegue ver alguma coisa?

 

O erro certo é:

 

Objeto resposta erro 'ASP 0251 : 80004005'

Limite da Memória Intermédia de Resposta excedido

/Index.asp, linha 0

A execução da página ASP fez com que a Memória Intermédia de Resposta excedesse o respetivo limite configurado.

<%
id="1" 'Identifica o id
Server.ScriptTimeout = 7500
Response.Flush

'Verfifica se existe ligação a net
Dim intStatus, objHTTP
Set objHTTP = CreateObject( "WinHttp.WinHttpRequest.5.1" )

    objHTTP.Open "GET", "http://www.google.com/", False
    objHTTP.SetRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MyApp 1.0; Windows NT 5.1)"

    On Error Resume Next

    objHTTP.Send
    intStatus = objHTTP.Status

    On Error Goto 0
Response.Flush
	If intStatus = 200 Then ' se existe ligacao a net entao define variaveis para conexao a db online
			
			Internet = "sim"
			nomebd = "painel"
			userdb = "root"
			passdb = "pass"
			servidor = "xxx.xxx.xx.xxx"	 

	Else	' se nao existe ligacao a net entao define variaveis para conexao a db local
			internet = "nao"
			nomebd = "painel"
			userdb = "root"
			passdb = "pass"
			servidor = "localhost"	

	End If

Set intStatus = Nothing
Set objHTTP = Nothing
Response.Flush
			
			'faz a ligacao com a bd
			dim conn
			Set conn = Server.CreateObject("ADODB.Connection")
			on error resume next
			conn.ConnectionString = "Driver={MYSQL ODBC 5.1 DRIVER};Server="&servidor&";Port=3306;Database="&nomebd&";Uid="&userdb&";Pwd="&passdb&";"  ' liga a bd
			conn.Open() 
				if err.number <> 0 then
					Response.Write "<br>Ocorreu o seguinte erro: "&Err.Description&", Source: "&Err.Source&"<br><br>"
				end if
				on error goto 0	
			
			
			'faz os selects das tabelas todas
			set textos = conn.Execute("select * from texto where id='"&id&"' ")	
			set videos = conn.Execute("select * from videos where id='"&id&"' ")	
			set noticias = conn.Execute("select * from noticias where id='"&id&"' ")				 
			set weather = conn.Execute("select * from weather where id='"&id&"' ")
			set ids= conn.Execute("select * from id where id='"&id&"' ")
			
			if textos.eof=true or videos.eof=true or weather.eof=true or ids.eof=true or noticias.eof=true then
				response.Write("<script>alert('Ocorreu um erro.\nObrigado');</script>")
			end if
Response.Flush			
%>

<!doctype html>
<html>
<head>
<title></title>
<meta charset="utf-8"/>

<link rel="stylesheet" href="style.css" type="text/css"/>
<script src="http://api.html5media.info/1.1.5/html5media.min.js"></script>
 
<script type="text/javascript">
function display_c(){
var refresh=1000; // Refresh rate in milli seconds
mytime=setTimeout('display_ct()',refresh)
}

function addZero(i) {
    if (i < 10) {
        i = "0" + i;
    }
    return i;
}

function display_ct() {
var strcount
var x = new Date()
var x1=x.getMonth() + "/" + x.getDate() + "/" + x.getYear();
x1 = addZero(x.getHours())+ ":" +addZero(x.getMinutes());
document.getElementById('ct').innerHTML = x1;

tt=display_c();

} 
</script>



</head>
<body onload=display_ct();>

<%
'configurações
logo=ids.fields("header") 
video="tv"
Response.Flush
%>

<div id="header" style="display: block;overflow: auto;position: relative;width: 100%;">
		<div id="h2" style="float: left;position: relative;width: 67.4%;height:25.5%;z-index:500;">
			<img src="img/<%=logo%>" >
		</div>
		
<!----------------------------------------------------------------------- Weather ---------------------------------------------------------------------------------------------------------------------------------->			
		<div id="head_text" style="z-index: 100; position: absolute;width:100%; overflow: hidden;">
			<%if internet="sim" then response.write weather.fields("cod") end if%>
		</div>
<!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->		
</div>

<!----------------------------------------------------------------------- Marque ---------------------------------------------------------------------------------------------------------------------------------->
<div id="wrapper" style="margin-top:-5%;display: block;position: relative;width: 100%;height: 80%;z-index:-1;">
		
		<div id="w2" style="float:right;display: block;position: relative;width:30%;height:700px;margin-top:15px;z-index:510;">
			<div class="container">
				<div class="demo-1 well" style="text-align:center;height:100%;font-size:45px;font-weight: bold;">
					
					<%
						do while not textos.eof=true
							response.write "|<span class='badge'>"&textos.fields("textos")&"</span>" 
						loop
					%> 
				
		
			</div>
		</div>
		
		<script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
		<script src="jquery.auto-text-rotating.js"></script>
		<script>
		$('.demo-1').atrotating({type: 'html'});
		</script>

</div>
<!---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->			


		<div id="w1" style="height:710px;width:67%;padding:0px;">
			<%
			if video="tv" and internet="sim" then
				response.write videos.fields("cod")
			else
			%>
				   
				   
					<figure id="video_player">
							<div id="video_container">
								<video controls="controls" poster="http://demosthenes.info/assets/images/vid-glacier.jpg" autoplay>
									<source src="http://demosthenes.info/assets/videos/glacier.mp4" type="video/mp4">
									<source src="http://demosthenes.info/assets/videos/glacier.webm" type="video/webm">
								</video>
							</div>
						
												
						<%	
						Response.Flush
							' dim fs,fo,x
							' set fs=Server.CreateObject("Scripting.FileSystemObject")
							' set fo=fs.GetFolder("C:\inetpub\wwwroot\Painel_Informativo\videos\")
							
							' setfir="class='currentvid'"
							
							' for each x in fo.files
							' xName = replace (x.name,"."&fs.GetExtensionName(x.Name), "" )							
							' %>
								
								' <a href="\videos\<%=xName%>.mp4" type="video/mp4" <%=setfir%>>
									' <img src="http://demosthenes.info/assets/images/vid-glacier.jpg" alt="<%=Ucase(xName)%>">
								' </a>
							' <%
							' setfir=""
							' next

							' set fo=nothing
							' set fs=nothing
						%>
												
						<figcaption>
							  <a href="http://demosthenes.info/assets/videos/glacier.mp4" class="currentvid">
								<img src="http://demosthenes.info/assets/images/vid-glacier.jpg" alt="Athabasca Glacier">
							  </a>
							  <a href="http://demosthenes.info/assets/videos/lake.mp4">
								<img src="http://demosthenes.info/assets/images/vid-lake.jpg" alt="Athabasca Lake">
							  </a>
							  <a href="http://demosthenes.info/assets/videos/mountain.mp4">
								<img src="http://demosthenes.info/assets/images/vid-mountain.jpg" alt="Mountain">
							  </a>
						</figcaption>
					</figure>
			  
			<%end if%>	
		</div>
</div>

<div id="footer" style="clear: both;display: block;width: 100%;height: 10%;">

		<div id="f1" style="float: right;position: relative;width: 31%;	height: 100%;z-index:520;font-size:45px;text-align: center;padding-top:40px;color:darkgrey;font-weight: bold;">
			<%Response.Write(ExibeData(now())) %>
		</div>
	
			
		<div id="f2" style="float: left;position: relative;width: 68%;height: 100%;z-index:520;">
		
				<!-- start sw-rss-feed code --> 
					<script type="text/javascript"> 
					<!-- 
					rssfeed_url = new Array(); 
					<%
					x=1
					do while not noticias.eof=true
					%>
					rssfeed_url[<%=x%>]="<%=noticias.fields("url")%>"; 
					<%
					x=x+1
					loop%>  
					rssfeed_frame_width="1150"; 
					rssfeed_frame_height="150"; 
					rssfeed_scroll="on"; 
					rssfeed_scroll_step="15"; 
					rssfeed_scroll_bar="off"; 
					rssfeed_target="_blank"; 
					rssfeed_font_size="29"; 
					rssfeed_font_face=""; 
					rssfeed_border="off"; 
					rssfeed_css_url=""; 
					rssfeed_title="off"; 
					rssfeed_title_name=""; 
					rssfeed_title_bgcolor="transparent"; 
					rssfeed_title_color="#fff"; 
					rssfeed_title_bgimage="http://"; 
					rssfeed_footer="off"; 
					rssfeed_footer_name="rss feed"; 
					rssfeed_footer_bgcolor="#fff"; 
					rssfeed_footer_color="#333"; 
					rssfeed_footer_bgimage="http://"; 
					rssfeed_item_title_length="150"; 
					rssfeed_item_title_color="black"; 
					rssfeed_item_bgcolor="transparent"; 
					rssfeed_item_bgimage="http://"; 
					rssfeed_item_border_bottom="on"; 
					rssfeed_item_source_icon="off"; 
					rssfeed_item_date="off"; 
					rssfeed_item_description="on"; 
					rssfeed_item_description_length="520"; 
					rssfeed_item_description_color="black"; 
					rssfeed_item_description_link_color="black"; 
					rssfeed_item_description_tag="off"; 
					rssfeed_no_items="0"; 
					rssfeed_cache = "aa115714cc4a2358ba9b311141cde101"; 
					//--> 
					</script> 
					<script type="text/javascript" src="http://feed.surfing-waves.com/js/rss-feed.js"></script> 
		
		
		</div>

</div>


<script>

var video_player = document.getElementById("video_player");
video = video_player.getElementsByTagName("video")[0],
video_links = video_player.getElementsByTagName("figcaption")[0],
source = video.getElementsByTagName("source"),
link_list = [],
vidDir = "http://demosthenes.info/assets/videos/",
currentVid = 0,
allLnks = video_links.children,
lnkNum = allLnks.length;
video.removeAttribute("controls");
video.removeAttribute("poster");

(function() {
function playVid(index) {
 video_links.children[index].classList.add("currentvid");
    source[1].src = vidDir + link_list[index] + ".webm";  
	source[0].src = vidDir + link_list[index] + ".mp4";
    currentVid = index;
    video.load();
	video.play();
}

for (var i=0; i<lnkNum; i++) {
var filename = allLnks[i].href;
link_list[i] = filename.match(/([^\/]+)(?=\.\w+$)/)[0];
(function(index){
        allLnks[i].onclick = function(i){
        i.preventDefault();  
		for (var i=0; i<lnkNum; i++) {
		allLnks[i].classList.remove("currentvid");
		}
		playVid(index);
        }    
    })(i);
}
video.addEventListener('ended', function () {
    allLnks[currentVid].classList.remove("currentvid");
    if ((currentVid + 1) >= lnkNum) { nextVid = 0 } else { nextVid = currentVid+1 }
    playVid(nextVid);
})

video.addEventListener('mouseenter', function() {
    video.setAttribute("controls","true");
})

video.addEventListener('mouseleave', function() {
    video.removeAttribute("controls");
})

var indexOf = function(needle) {
    if(typeof Array.prototype.indexOf === 'function') {
        indexOf = Array.prototype.indexOf;
    } else {
        indexOf = function(needle) {
            var i = -1, index = -1;
			for(i = 0; i < this.length; i++) {
                if(this[i] === needle) {
                    index = i;
                    break;
                }}
            return index;
        };}
    return indexOf.call(this, needle);
};
 	var focusedLink = document.activeElement;
 	index = indexOf.call(allLnks, focusedLink);
 	
document.addEventListener('keydown', function(e) {
if (index) {
	var focusedElement = document.activeElement;
    if (e.keyCode == 40 || e.keyCode == 39) { // down or right cursor
    var nextNode = focusedElement.nextElementSibling;
    if (nextNode) { nextNode.focus(); } else { video_links.firstElementChild.focus(); }
    }
   if (e.keyCode == 38 || e.keyCode == 37) { // up or left cursor
    var previousNode = focusedElement.previousElementSibling;
    if (previousNode) { previousNode.focus(); } else { video_links.lastElementChild.focus(); }
    }
 }
});

})();  


</script>



</body>
</html>

<%
Response.Flush


		Function ExibeData(data)
		  dia_semana = WeekDay(data)
		  Select Case dia_semana
		  Case 1 : dia_semana = "Domingo"
		  Case 2 : dia_semana = "Segunda"
		  Case 3 : dia_semana = "Terça"
		  Case 4 : dia_semana = "Quarta"
		  Case 5 : dia_semana = "Quinta"
		  Case 6 : dia_semana = "Sexta"
		  Case 7 : dia_semana = "Sábado"
		  End Select
		  mes = Month(data)
		  Select Case mes
		  Case 1 : mes = "Janeiro"
		  Case 2 : mes = "Fevereiro"
		  Case 3 : mes = "Março"
		  Case 4 : mes = "Abril"
		  Case 5 : mes = "Maio"
		  Case 6 : mes = "Junho"
		  Case 7 : mes = "Julho"
		  Case 8 : mes = "Agosto"
		  Case 9 : mes = "Setembro"
		  Case 10 : mes = "Outubro"
		  Case 11 : mes = "Novembro"
		  Case 12 : mes = "Dezembro"
		  End Select
		  ExibeData = dia_semana &",<br> "& Day(Date()) & " de " & mes & " de " & Year(data)
		End Function
		
		
'Fecha ligações a bd		
Set textos = Nothing
Set videos = Nothing
Set weather = Nothing
Set ids= Nothing
Set noticias = Nothing
conn.Close
Response.Flush
%>



Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.