Précédent   Forum des professionnels en informatique > Webmasters - Développement Web > Langages serveur > ASP
ASP Forum sur la programmation ASP. Avant de poster : Cours ASP, FAQ ASP
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 06/09/2006, 13h24   #1
Membre à l'essai
 
Inscription : avril 2006
Messages : 87
Détails du profil
Informations personnelles :
Âge : 36
Localisation : France, Pyrénées Orientales (Languedoc Roussillon)

Informations forums :
Inscription : avril 2006
Messages : 87
Points : 20
Points : 20
Par défaut Site prenant trop de ressources réseaux ?

Affichage du message
Site intranet prenant beaucoup de ressources
Ajouté par Riwalenn 2006-09-06 10:23:51 (GMT+2)
Statut : En cours
Bonjour,

je ne suis pas sûre d'être sur le bon forum mais tant pis.
J'ai actuellement dans mon entreprise un site intranet servant de logiciel de gestion/commerciale développé en ASP.
Il y a quelques jours nous avions un serveur avec pour processeur un "x86 Family 6Model 8 stepping 10 AT/AT compatible" ce week-end nous l'avons troqué pour un "pentium 4".

Depuis, il y a certaines requête que nous ne pouvons plus faire à partir du site intranet et lorsque celle-ci sont en cours, les autres utilisateurs "rament".

J'ai ouvert l'outil de performance sur le serveur et j'ai vu qu'à chaque fois que je faisais cette requête devenue impossible, le processeur était utilisé à 100% !

Comment est-il possible qu'aujourd'hui, je ne puisse plus faire cette requête (consistant tout simplement à me donner l'ensemble de notre stock) ?

merci d'avance pour votre aide.

P.S : j'ai testé la même requête sur le serveur lui-même il me la donne au bout d'une longue attente (qui n'était pas aussi longue auparavant).
Riwalenn est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 06/09/2006, 15h06   #2
Membre à l'essai
 
Inscription : juin 2006
Messages : 88
Détails du profil
Informations personnelles :
Localisation : France, Gironde (Aquitaine)

Informations forums :
Inscription : juin 2006
Messages : 88
Points : 20
Points : 20
Quand le serveur a etait change, le systeme a t-il etait reinstalle? Des fois que des incompatibilites ralentiraient la machine ...
Quel est le systeme?
As-tu des logs pour voir si une erreur ne se produirait pas? Et aussi verifie avec un autre prog si c'est juste le serveur de BDD qui rame ou si ce sont toutes les applis qui subissent le ralentissement.
gwenhael est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 06/09/2006, 16h17   #3
Membre à l'essai
 
Inscription : avril 2006
Messages : 87
Détails du profil
Informations personnelles :
Âge : 36
Localisation : France, Pyrénées Orientales (Languedoc Roussillon)

Informations forums :
Inscription : avril 2006
Messages : 87
Points : 20
Points : 20
à part le visualisateur d'évènement j'ai pas d'autres logs...
on a changé de configuration mais aussi de système. On est passé de small business server 2000 à 2003 standard R2.
pour la config, on avait comme proc un x86 family... et aujourd'hui on a un P4...
mais je ne vois pas où je peux trouver un log pour m'informer de l'erreur ?!

ce qui est bizarre c'est que mon boss me dit qu'il a déjà réussit cette requête depuis son poste lundi matin, j'ai fait cette requête mardi après-midi sur un autre poste et j'ai mis 3/4 d'heure pour pouvoir accéder à ce stock, en comptant que le site intranet m'a jeté plusieurs fois avant de me le donner.
Riwalenn est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 06/09/2006, 16h32   #4
Membre à l'essai
 
Inscription : juin 2006
Messages : 88
Détails du profil
Informations personnelles :
Localisation : France, Gironde (Aquitaine)

Informations forums :
Inscription : juin 2006
Messages : 88
Points : 20
Points : 20
C'est vrai que c'est bizarre...
Vu ton premier poste ca ne viens pas du reseau ...
Ca me fait un peu penser a un probleme de memoire ou de blocage d'une quelconque file d'attente... le lundi le serveur et l'ordi est frais de reinstall, ensuite la charge augmente...
Sans indiscretion c'est quoi comme serveur de BDD?
As-tu regarde sur le site du constructeur des fois qu'il serait necessaire d'appliquer un patch ou une mise a jour pour le faire tourner sous 2003?

Gwen
gwenhael est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 06/09/2006, 17h13   #5
Membre à l'essai
 
Inscription : avril 2006
Messages : 87
Détails du profil
Informations personnelles :
Âge : 36
Localisation : France, Pyrénées Orientales (Languedoc Roussillon)

Informations forums :
Inscription : avril 2006
Messages : 87
Points : 20
Points : 20
on a SQL server 2000 et non on a pas regardé s'il y avait un patch pour le faire tourner sous 2003, on y a pas pensé..
Riwalenn est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 06/09/2006, 17h22   #6
Membre à l'essai
 
Inscription : juin 2006
Messages : 88
Détails du profil
Informations personnelles :
Localisation : France, Gironde (Aquitaine)

Informations forums :
Inscription : juin 2006
Messages : 88
Points : 20
Points : 20
service pack4?
gwenhael est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 06/09/2006, 17h27   #7
Membre à l'essai
 
Inscription : avril 2006
Messages : 87
Détails du profil
Informations personnelles :
Âge : 36
Localisation : France, Pyrénées Orientales (Languedoc Roussillon)

Informations forums :
Inscription : avril 2006
Messages : 87
Points : 20
Points : 20
heu non service pack 3
Riwalenn est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 06/09/2006, 17h35   #8
Membre à l'essai
 
Inscription : juin 2006
Messages : 88
Détails du profil
Informations personnelles :
Localisation : France, Gironde (Aquitaine)

Informations forums :
Inscription : juin 2006
Messages : 88
Points : 20
Points : 20
http://support.microsoft.com/?kbid=888799
et entre autre : http://support.microsoft.com/kb/813779/
Je pense que tu devrais faire la mise a jour. Si le risque pour un serveur d'intranet n'est pas trop important evidement
Gwenhael
gwenhael est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 06/09/2006, 17h56   #9
Membre à l'essai
 
Inscription : avril 2006
Messages : 87
Détails du profil
Informations personnelles :
Âge : 36
Localisation : France, Pyrénées Orientales (Languedoc Roussillon)

Informations forums :
Inscription : avril 2006
Messages : 87
Points : 20
Points : 20
je te remercie je regarderais ça dès demain (quand j'aurais un peu de temps lol)
Riwalenn est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 06/09/2006, 18h01   #10
Membre à l'essai
 
Inscription : juin 2006
Messages : 88
Détails du profil
Informations personnelles :
Localisation : France, Gironde (Aquitaine)

Informations forums :
Inscription : juin 2006
Messages : 88
Points : 20
Points : 20
A vot' service
Gwenhaël
gwenhael est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 14/09/2006, 23h58   #11
Membre confirmé
 
Inscription : juin 2005
Messages : 412
Détails du profil
Informations personnelles :
Localisation : France, Paris (Île de France)

Informations forums :
Inscription : juin 2005
Messages : 412
Points : 261
Points : 261
Envoyer un message via MSN à mael94420
Réponse sans doute idiote
J'ai eu un soucis dans le meme genre si je presume que tu affiche un tableau avec cete requete pour connaitre les stocks.
Je tournais sous W2k et je faisait une boucle do While ... Loop qui fonctionnai bien. J suis passé sous p pro, et la IIS s'embllait et j'ai simplement remplacé cette boucle par un While ...Wend.

On aide comme on peut

Bon courage
++
mael94420 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 15/09/2006, 09h09   #12
Membre à l'essai
 
Inscription : avril 2006
Messages : 87
Détails du profil
Informations personnelles :
Âge : 36
Localisation : France, Pyrénées Orientales (Languedoc Roussillon)

Informations forums :
Inscription : avril 2006
Messages : 87
Points : 20
Points : 20
je te remercie pour la réponse, je vais voir où je peux trouver la requête en question ( je n'ai pas trouvé encore la page qui sort ce tableau)
Riwalenn est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 15/09/2006, 09h51   #13
Membre à l'essai
 
Inscription : avril 2006
Messages : 87
Détails du profil
Informations personnelles :
Âge : 36
Localisation : France, Pyrénées Orientales (Languedoc Roussillon)

Informations forums :
Inscription : avril 2006
Messages : 87
Points : 20
Points : 20
je ne trouve pas la requête en question... je mets le code ci-dessous si quelqu'un peut m'aider, merci d'avance :

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<!-- #Include virtual="/Scripts/eStockFuncs.asp" -->
<%
 
 
If IsValid(Request("User"), Request("Valid")) Then
	Dim sSQL
	Dim RS
	Dim RS2
	Dim RS3
	Dim iCount
	Dim sType
	Dim cType
	Dim fSubTot
	Dim iQtyTot
	Dim fTot
	Dim iQty
 
	On Error Resume Next
%>
 
<html>
 
<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Eurosource Stock Report</title>
<%
 
 
If Request("Print") <> "" Then
%>
<OBJECT ID="PTLauncher" CLASSID="CLSID:B43D3361-D975-4BE2-87FE-438AB8E74394" codebase="/Scripts/Printing/brochuremachine.dll#Version=1.1.0.7"></OBJECT>
<%
 
 
End If
%>
</head>
 
<body>
<input type="hidden" id="PrintPage" value="stock_report">
<div id="layoutrect" align="left" style="position: absolute; left: 0; top: 0; width: 700px; height: 450px; overflow: auto; word-wrap: break-word;">
  <table border="0" cellpadding="0" cellspacing="0" width="90%">
    <tr>
      <td width="50%" colspan="5" align="center">
        <p style="padding-bottom: 25"><b><font face="Arial" size="5">Eurosource
        Stock ReportTEST
        </font></b></p>
      </td>
    </tr>
    <tr>
      <td width="50%" colspan="5" align="center">
        <p style="padding-bottom: 25"><b><font face="Arial" size="4">Date <%=Date()%>
        </font></b></p>
      </td>
    </tr>
    <tr>
      <td width="20%" style="border-bottom-style: solid; border-bottom-width: 1; padding-bottom: 2"><font face="Arial" size="1">Ref</font></td>
      <td width="40%" style="border-bottom-style: solid; border-bottom-width: 1; padding-bottom: 2"><font face="Arial" size="1">Description</font></td>
      <td width="10%" style="border-bottom-style: solid; border-bottom-width: 1; padding-bottom: 2"><font face="Arial" size="1">Quality</font></td>
      <td width="10%" style="border-bottom-style: solid; border-bottom-width: 1; padding-bottom: 2"><font face="Arial" size="1">Quantity</font></td>
      <td width="20%" style="border-bottom-style: solid; border-bottom-width: 1; padding-bottom: 2" align="right"><font face="Arial" size="1">Value</font></td>
    </tr>
<%
 
 
	fTot = 0
	iQty = 0
	For iCount = 0 To 2
		Select Case iCount
			Case 0
				sType = "Laser"
				cType = "L"
			Case 1
				sType = "Inkjet"
				cType = "I"
			Case Else
				sType = "Mobile"
				cType = "M"
		End Select
		fSubTot = 0
		iQtyTot = 0
%>
    <tr>
      <td width="50%" colspan="5">
          <table border="0" cellpadding="0" cellspacing="0" width="100%" height="25">
            <tr>
              <td><b><font face="Arial" size="2"><%=sType%> Product</font></b></td>
            </tr>
          </table>
      </td>
    </tr>
<%
 
 
		sSQL = "Select Distinct S.ProductName, P.ProductDesc From Stock S Left Join Products P On (S.ProductName = P.ProductName) Where P.Type = '" & cType & "' And S.Quality <> 'S' Order By S.ProductName Asc"
		Set RS = NewRS(sSQL)
		While Not RS.EOF
			sSQL = "Select Distinct Quality From Stock Where ProductName = '" & SQLString(RS("ProductName")) & "' And Quality <> 'S' Order By Quality Asc"
			Set RS2 = NewRS(sSQL)
			While Not RS2.EOF
				sSQL = "Select Sum(Quantity) As Qty From Stock Where ProductName = '" & SQLString(RS("ProductName")) & "' And Quality = '" & SQLString(RS2("Quality")) & "'"
				Set RS3 = NewRS(sSQL)
				iTempQ = RS3("Qty")
				If IsNull(iTempQ) Then
					iTempQ = 0
				End If
				iTempQ = CInt(iTempQ)
				iTempP = RS("ProductPrice")
				If IsNull(iTempP) Then
					iTempP = 0
				End If
				iTempP = CDbl(iTempP)
				iTempP = iTempP * iTempQ
				fSubTot = fSubTot + iTempP
				iQtyTot = iQtyTot + iTempQ
%>
    <tr>
      <td width="50%" colspan="5">
          <table border="0" cellpadding="0" cellspacing="0" width="100%" height="25">
            <tr>
              <td width="20%" nowrap><font face="Arial" size="1"><%=Server.HTMLEncode(RS("ProductName"))%></font></td>
              <td width="45%"><font face="Arial" size="1"><%=Server.HTMLEncode(RS("ProductDesc"))%></font></td>
              <td width="10%" nowrap><font face="Arial" size="1"><%=Server.HTMLEncode(RS2("Quality"))%></font></td>
              <td width="10%" nowrap><font face="Arial" size="1"><%=Server.HTMLEncode(iTempQ)%></font></td>
              <td width="15%" nowrap>
              <p align="right"><font face="Arial" size="1" nowrap>&pound; <%=FormatNumber(iTempP, 2)%></font></p>             
              </td>
<!--              <td width="18%"></td>-->
            </tr>
          </table>
      </td>
    </tr>
<%
 
 
				Response.Flush
				Set RS3 = Nothing
				RS2.MoveNext
			Wend
			Set RS2 = Nothing
			RS.MoveNext
		Wend
		Set RS = Nothing
%>
    <tr>
      <td width="50%" colspan="5">
          <table border="0" cellpadding="0" cellspacing="0" width="100%" height="30">
            <tr>
              <td width="75%" style="padding-top: 13; padding-bottom: 8" nowrap><font face="Arial" size="2"><b>Total Value of
                <%=sType%> Product</b></font></td>
              <td width="12%" style="border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; padding-top: 13; padding-bottom: 8" nowrap><font face="Arial" size="2"><%=iQtyTot%></font></td>
              <td width="13%" style="border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; padding-top: 13; padding-bottom: 8" nowrap>
                <p align="right"><font face="Arial" size="2">&pound; <%=FormatNumber(fSubTot, 2)%></font></p>
              </td>
 
            </tr>
          </table>
      </td>
    </tr>
    <tr>
      <td width="50%" colspan="5"><br>
      </td>
    </tr>
<%
 
 
		fTot = fTot + fSubTot
		iQty = iQty + iQtyTot
	Next
%>
    <tr>
      <td width="50%" colspan="5">
          <table border="0" cellpadding="0" cellspacing="0" width="100%" height="30">
            <tr>
              <td width="75%" style="padding-top: 13; padding-bottom: 8"><font face="Arial" size="2" nowrap><b>Total
                Value of Stock</b></font></td>
              <td width="12%" style="border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; padding-top: 13; padding-bottom: 8" nowrap><font face="Arial" size="2"><b><%=iQty%></b></font></td>
              <td width="13%" style="border-top-style: solid; border-top-width: 1; border-bottom-style: solid; border-bottom-width: 1; padding-top: 13; padding-bottom: 8" nowrap>
                <p align="right"><font face="Arial" size="2"><b>&pound; <%=FormatNumber(fTot, 2)%></b></font></p>
              </td>
 
            </tr>
          </table>
      </td>
    </tr>
  </table>
</div>
<%
 
 
	If Request("Print") <> "True" Then
%>
	<div style="top: 10px; right: 10px; z-index: 200; text-align: right">
<a href="#" onclick="SendCmd('PrintPage');" style="color: navy; cursor: hand;">Print...</a>
	</div>
<%
 
 
	Else
%>
<OBJECT id="printpage" PageSize='A4' PrinterShow="TRUE" Header="2e-Header Text" Footer="Page &p"></OBJECT>
<%
 
 
	End If
%>
</body>
 
</html>
<%
 
 
Else
%>
<center><h1>Authentication Failure</h1></center>
<%
 
 
End If
%>
Riwalenn est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 15/09/2006, 11h52   #14
Expert Confirmé Sénior

 
Avatar de Immobilis
 
Inscription : mars 2004
Messages : 5 849
Détails du profil
Informations forums :
Inscription : mars 2004
Messages : 5 849
Points : 5 965
Points : 5 965
Salut,

Le code à l'air correct cependant tu a 3 requetes SQL imbriquées. C'est très consommateur de ressources. Tu peux éventuellement essayer
  • d'en supprimer
  • de modifier tes requetes pour qu'elle renvoi moins d'enregistrement
  • utiliser la methode getrows()
A+
PS: tu as un <input> sans <form> dans ton code
Immobilis est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 08h15.


 
 
 
 
Partenaires

Hébergement Web