Visualizzazione dei risultati da 1 a 9 su 9
  1. #1
    Utente di HTML.it L'avatar di naverit
    Registrato dal
    Apr 2002
    Messaggi
    460

    pagine asp bloccate ASPETTARE?

    mi si sono bloccate delle pagine asp (nel senso che non si aprono... il browser cerca per tanto tempo di farlo).
    a volte capita quando si inseriscono contemporaneamente dei record nel db (access) da 2 amministratori... ma basta aspettare circa mezz'ora e dopo ritorna a funzionare correttamente...

    forse bisogna aspettare che scada una sessione?

    da cosa dipende? si può risolvere senza aspettare un'eternità?
    ora è quasi un'ora che aspetto!!!
    Ars longa...vita brevis.

  2. #2
    Utente di HTML.it L'avatar di viki1967
    Registrato dal
    Feb 2003
    Messaggi
    1,757
    Assolutamente anomalo; riguardati il codice forse hai dei cicli infiniti.
    A S P : tutto il resto è noia...
    L I N U X : forse mi "converto"...

  3. #3
    Utente di HTML.it L'avatar di naverit
    Registrato dal
    Apr 2002
    Messaggi
    460

    ecco il codice.. pare di no

    <% Session.LCID = 1040 %>





    <% cat = Request.Querystring("cat") %>



    <html>
    <head>
    <meta name="Robots" content="none">
    <meta http-equiv="Expires" content="0">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache_Control" content="no-cache">
    <link href="style.css" rel="stylesheet" type="text/css">
    </head>
    <BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="background-attachment: fixed; background-image: url('images/bkg.jpg');">
    <TABLE WIDTH="560" CELLPADDING="0" CELLSPACING="0" BORDER="0" align="center">
    <TD>
    <%


    'determino il nome di questo file anche se rinominato...
    Dim path, thisfile
    path = Request.ServerVariables("PATH_INFO")
    path = mid(path,instrrev(path,"/") + 1)
    ' ... e lo chiamo thisfile
    thisfile = path



    If request.QueryString ("cerca") = "" Then
    iPageSize = 4 'NUMERO RECORD PER PAGINA
    else
    iPageSize = 4 'NUMERO RECORD PER PAGINA
    end if



    If Request.QueryString("page") = "" Then
    iPageCurrent = 1
    Else
    iPageCurrent = CInt(Request.QueryString("page"))
    End If

    dim cerca
    cerca = request.QueryString ("cerca")







    If cat = "" Then ' (SE NON HO SELEZIONATO NESSUNA CATEGORIA)
    If cerca = "" Then
    strSQL = "SELECT * FROM immagini Where id>0 ORDER BY id DESC"
    else
    strSQL = "SELECT * FROM immagini Where titolo like '%" & cerca & "%' OR descrizione like '%" & cerca & "%' ORDER BY id DESC"
    end if
    end if

    If cat <> "" Then' (SE HO SELEZIONATO UNA CATEGORIA)


    if lang = "" then 'LINGUA ITALIANA'
    If cerca = "" Then
    strSQL = "SELECT * FROM immagini Where idCat = '" & cat & "' ORDER BY id DESC"
    else
    strSQL = "SELECT * FROM immagini Where idCat = '" & cat & "' AND titolo like '%" & cerca & "%' OR idCat = '" & cat & "' AND descrizione like '%" & cerca & "%' ORDER BY id DESC"
    end if
    end if

    if lang <> "" then 'LINGUA INGLESE DA FARE: modificare tipo in tipoeng'
    If cerca = "" Then
    strSQL = "SELECT * FROM immagini Where idCat = '" & cat & "' ORDER BY id DESC"
    else
    strSQL = "SELECT * FROM immagini Where idCat = '" & cat & "' AND titolo like '%" & cerca & "%' OR idCat = '" & cat & "' AND descrizione like '%" & cerca & "%' ORDER BY id DESC"
    end if
    end if



    end if




    Set objRS = Server.CreateObject("ADODB.Recordset")
    objRS.PageSize = iPageSize
    objRS.CacheSize = iPageSize
    objRS.Open strSQL, objConn, adOpenStatic, adLockReadOnly, adCmdText

    reccount = objRS.recordcount
    iPageCount = objRS.PageCount

    If iPageCurrent > iPageCount Then iPageCurrent = iPageCount
    If iPageCurrent < 1 Then iPageCurrent = 1


    %>




    <table width="560" align="center" border="0">
    <tr>
    <td width="" bgcolor="white">
    [img]<%=logo %>[/img]
    </td>
    </tr>
    </table>

    <table width="560" align="center" border="0">

    <tr>
    <td align="left" bgcolor="white">


    <%
    If lang = "" Then
    %>
    &raquo; 1° Pag.
    <%
    else
    %>
    &raquo; 1° Page
    <%
    end if
    %>


    [img]images/admin.gif[/img]" border="0"/>

    </td>


    <form method="get" action="<%=thisfile %>">
    <td>

    <%
    strSQL2 = "SELECT * FROM categorie ORDER BY cat DESC"
    Set objRS2 = Server.CreateObject("ADODB.Recordset")
    objRS2.Open strSQL2, objConn
    %>

    <select name="cat" onchange="location.href=this.options[this.selectedIndex].value;">

    - <option value=""><%=categorie %>:</option>
    <%
    if not objrs2.eof then
    do while not objrs2.eof
    %>

    <%

    If lang = "" Then
    categoria = objrs2("cat")
    else
    categoria = objrs2("catEng") 'categoria = objrs2("catEng")
    end if

    categ = objrs2("id")
    %>

    <option value="<%=thisfile %>?cat=<%=categ %>&categoria=<%=categoria %>&lang=<%=lang %>"> - <%=categoria%></option>

    <%
    objrs2.movenext
    loop

    else
    %>
    - <option value="-1"><%=nessuna %></option>
    <%
    end if
    objrs2.close
    set objrs2 = nothing
    %>

    <option value="<%=thisfile %>?lang=<%=lang %>">- - > <%=tutte %></option>
    </select>

    </td>
    </form>




    <form method="get" action="<%=thisfile %>">
    <td align="right" bgcolor="white">
    <% If lang <> "" then %>
    <input type="hidden" name="lang" value="<%=lang %>">
    <% end If %>

    <% If cat <> "" then %>
    <input type="hidden" name="cat" value="<%=cat %>">
    <% end If %>

    <% If Request.Querystring("categoria") <> "" then %>
    <input type="hidden" name="categoria" value="<%=Request.Querystring("categoria") %>">
    <% end If %>

    <input type="text" name="cerca" value="<%=langCerca %>" onclick="value=''">
    <input type="image" src="cerca.gif" value="Cerca" alt="<%=altCerca %>">


    </td>
    </form>

    </tr>


    <tr>
    <td width="" colspan="3" bgcolor="#FFFFCC">
    <%

    If cat <> "" Then
    Response.Write categorie & " : " & Request.Querystring("categoria") & ""
    else
    Response.Write categorie & ": " & tutte &""
    end if

    If cerca <> "" Then
    Response.Write "" & haicercato & ": " & cerca & ""
    end if
    %>
    </td>
    </tr>


    </table>



    <%

    If iPageCount = 0 Then
    Response.Write "<table width='555' cellpadding='4' align='center' border='1'><tr><td><font face='verdana' size='2' color='#000000'>Il database non contiene i dati richiesti</td></tr></table>"
    Else
    objRS.AbsolutePage = iPageCurrent
    iRecordsShown = 0

    %>





    <table cellpadding="0" cellspacing="0" border="0" width="555" align="center">
    <tr>
    <td bgcolor="#cccccc">
    <table cellpadding="4" cellspacing="0" border="1" width="100%">

    <tr height="22">
    <td bgcolor="#77B71A" WIDTH="90"><font face="verdana" size="2" color="white"><%=colonna1 %></font></td>
    <td bgcolor="#77B71A" WIDTH="130"><font face="verdana" size="2" color="white"><%=colonna2 %></font></td>
    <td bgcolor="#77B71A" WIDTH="" align="left"><font face="verdana" size="2" color="white"><%=colonna3 %></font></td>
    <td bgcolor="#77B71A" WIDTH="12" align="center"><font face="verdana" size="2" color="white"></font></td>
    </tr>
    <%
    'SI VISUALIZZA IL CONTENUTO DELLA STRINGA SQL
    'ALL'INTERNO DELLA TABELLA PRIMA DEFINITA
    cont=1
    Do While iRecordsShown < iPageSize And Not objRS.EOF
    Dim Rig, bg
    Rig = Rig + 1
    If Rig Mod 2 = 0 then
    bg = "#E4E4E4"
    Else
    bg = "#ccccff"
    End if


    If objRS("fileOpera1") <> "" Then
    Response.Write "<tr bgcolor = " & bg & "><td><font color='#000000' face='Verdana' size='1'>[img]./public/opere/" & objRS("fileOpera1") & "[/img]</font></td>"
    else
    Response.Write "<tr bgcolor = " & bg & "><td><font color='#000000' face='Verdana' size='1'>[img]images/noimage.gif[/img]</font></td>"
    end if


    titolo2 = objRS("titolo")
    arrRicerca = split(cerca)
    for each item in arrRicerca
    titolo2 = replace(titolo2,item,"<span style='background-color:yellow;'>" & item & "</span>",1,-1,vbTextCompare)
    next

    If lang = "" Then
    tipo = objRS("tipo")
    else
    tipo = objRS("tipoEng") ' tipo = objRS("tipoEng")
    end if

    Response.Write "<td><font color='#000000' face='Verdana' size='1'>" & titolo2 & "
    (" & tipo & ")

    " & pezzi & ": " & objRS("qt") & "</font></td>"
    Response.Write "<td align='left'>"
    Response.Write "<font color='#000000' face='Verdana' size='1'>" & mag & ": " & objRS("magazzino") & "</font>
    "
    Response.Write "<font color='#000000' face='Verdana' size='1'>" & pal & ": " & objRS("pallet") & "</font>
    "
    'Response.Write "<font color='#000000' face='Verdana' size='1'>" & cor & ": " & objRS("corridoio") & "</font>
    "
    'esponse.Write "<font color='#000000' face='Verdana' size='1'>" & col & ": " & objRS("colonna") & "</font>
    "
    'Response.Write "<font color='#000000' face='Verdana' size='1'>" & pia & ": " & objRS("piano") & "</font>
    "

    data1 = objRS("data1")
    Mydate = Data1 ' Ricavo la data
    MyYear=Year (Mydate) ' Estrapolo l'anno
    If MyYear <> "1900" Then
    Response.Write "<font color='#000000' face='Verdana' size='1'>" & entrata & ": " & objRS("data1") & "</font>
    "
    end if

    data2 = objRS("data2")
    Mydate2 = Data2 ' Ricavo la data
    MyYear2=Year (Mydate2) ' Estrapolo l'anno
    If MyYear2 <> "1900" Then
    Response.Write "<font color='#000000' face='Verdana' size='1'>" & uscita & ": " & objRS("data2") & "</font>
    "
    end if


    'Response.Write "<font color='#000000' face='Verdana' size='1'>" & entrata & ": " & objRS("data1") & "</font>
    "
    'Response.Write "<font color='#000000' face='Verdana' size='1'>" & uscita & ": " & objRS("data2") & "</font>
    "
    Response.Write "<font color='#000000' face='Verdana' size='1'>" & annotaz & ":
    <span style='background-color:#CCFF99;'>" & objRS("annotazioni") & "</span></font>
    "
    Response.Write "</td>"

    Response.Write "<td align='center'><font color='#000000' face='Verdana' size='1'>"
    Response.Write "[img]images/note.gif[/img]"
    Response.Write "</font></td>"


    Cont = Cont + 1
    'POSIZIONAMENTO ALLA RIGA SUCCESSIVA DEL DB
    iRecordsShown = iRecordsShown + 1
    objRS.MoveNext
    Loop
    'PULIZIA DEGLI OGGETTI ADO
    objRS.Close
    Set objRS = Nothing
    %>
    </table>
    </td>
    </tr>
    <tr>
    <td width="" colspan="4" bgcolor="#77B71A">
    <%
    If lang = "" Then
    %>
    [img]images/eng.jpg[/img]
    <%
    else
    %>
    [img]images/ita.jpg[/img]
    <%
    end if
    %>
    [img]images/help.gif[/img]
    </td>
    </tr>
    </table>




    <%End if%>







    <%
    objConn.Close
    Set objConn = Nothing
    %>
    </TD>
    </TR>
    </TABLE>
    </body>
    </html>
    Ars longa...vita brevis.

  4. #4
    Utente di HTML.it L'avatar di naverit
    Registrato dal
    Apr 2002
    Messaggi
    460
    e comunque è andato benissimo x 2 settimane...
    si è bloccato mentre facevo inserivo records contemporaneamente con un altro amministratore.
    Ars longa...vita brevis.

  5. #5
    Utente di HTML.it L'avatar di viki1967
    Registrato dal
    Feb 2003
    Messaggi
    1,757
    Ma lo provi in locale o in hosting?
    A S P : tutto il resto è noia...
    L I N U X : forse mi "converto"...

  6. #6
    Utente di HTML.it L'avatar di naverit
    Registrato dal
    Apr 2002
    Messaggi
    460
    è caricato online...

    è capitato anche un'altra volta: mentre io facevo il backup del db access, un mio collaboratore inseriva un record... si bloccò tutto... è bastato aspettare e funzionava dopo un po'...
    Ars longa...vita brevis.

  7. #7
    Utente di HTML.it L'avatar di viki1967
    Registrato dal
    Feb 2003
    Messaggi
    1,757
    Hai contattato l'assistenza del tuo provider?
    A S P : tutto il resto è noia...
    L I N U X : forse mi "converto"...

  8. #8
    Utente di HTML.it L'avatar di naverit
    Registrato dal
    Apr 2002
    Messaggi
    460
    il provider è un mio amico, che oggi non è al lavoro...
    altrimenti gli facevo riavviare il server...

    purtroppo credo che debba solo aspettare!
    Ars longa...vita brevis.

  9. #9
    Utente di HTML.it L'avatar di naverit
    Registrato dal
    Apr 2002
    Messaggi
    460
    p.s. mi dai un'occhiata al codice?
    non mi pare di avere cicli infiniti!!!
    Ars longa...vita brevis.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.