ورود

View Full Version : Script timed out



mostafa612003
چهارشنبه 28 شهریور 1386, 08:51 صبح
سلام
برای حل این مشکل چه باید بکنم؟

متشکرم

hector2000
چهارشنبه 28 شهریور 1386, 11:45 صبح
لطفا بیشتر توضیح بدید که در چه زمانی و .. این ارور نمایش داده می شود؟

M-Gheibi
چهارشنبه 28 شهریور 1386, 21:33 عصر
در مورد این خطا توضیح بخصوصی نمیشه داد ( مگر با دیدن سورس ) ولی به طور کلی وقتی اجرای کد سرور ساید یک صفحه از زمان تعیین شده ( بصورت پیشفرض 90 ثانیه ) بیشتر زمان ببره این خطا نمایش داده میشه . همونطور که گفتم دلیل مشخصی نمیشه براش ذکر کرد ولی هرچه کد شما optimizeتر باشه احتمال مواجه شدن با این خطا کمتر میشه.

پ.ن : اغلب در صفحاتی که با بانک اطلاعاتی در ارتباطند این مورد مشاهده میشه .

mostafa612003
یک شنبه 01 مهر 1386, 14:21 عصر
خوب من حالا چه باید بکنم؟

M-Gheibi
یک شنبه 01 مهر 1386, 15:57 عصر
.....

مگر با دیدن سورس
.....

mostafa612003
چهارشنبه 04 مهر 1386, 09:02 صبح
این هم سورس برنامه ام:
<%
Set Conn = Server.CreateObject("ADODB.Connection")
strconn="Driver={SQL Server};Server=SERVER1;Database=shohada;UID=newsa; PWD=p256k4444"
Conn.Open Strconn


Set Rs=Server.CreateObject("ADODB.RecordSet")
Set Rs2=Server.CreateObject("ADODB.RecordSet")
Set Rs3=Server.CreateObject("ADODB.RecordSet")
Set Rs4=Server.CreateObject("ADODB.RecordSet")
Set Rs5=Server.CreateObject("ADODB.RecordSet")
m=0
Rs.open "select * from shahidmain where number <= 290 order by family ", conn,adOpenKeyset, adLockPessimistic, adCmdText
c=rs.recordcount
while not rs.eof
m=m+rs("MemorabiliaCount")
rs.movenext
wend
m=m+c

Rs2.open "select * from shahidmain where img=1 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
p=rs2.recordcount
Rs3.open "select * from shahidmain where AlbumCount>4 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
a=rs3.recordcount
' Rs4.open "select * from Memorabilia", conn,adOpenKeyset, adLockPessimistic, adCmdText
' m=rs4.recordcount+c+r
Rs5.open "select * from shahidmain ", conn,adOpenKeyset, adLockPessimistic, adCmdText
while not rs5.eof
cod=rs5("code")
Set RSAction=Server.CreateObject("ADODB.RecordSet")
rsAction.open "select * from radepaActions where shcode='"&cod&"' and ind<>0 ",conn, adOpenKeyset, adLockPessimistic, adCmdText
countAction=RsAction.recordcount
if countAction>3 then m=m+1
rs5.movenext
wend

rs.close
rs2.close
rs3.close
' rs4.close
rs5.close




Rs.open "select * from shahidmain where gro=1 and number <= 290 order by family", conn,adOpenKeyset, adLockPessimistic, adCmdText
c1=rs.recordcount 'بین الملل
while not rs.eof
m1=m1+rs("MemorabiliaCount")
rs.movenext
wend
m1=m1+c1
Rs2.open "select * from shahidmain where gro=1 and img=1 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
p1=rs2.recordcount
Rs3.open "select * from shahidmain where gro=1 and AlbumCount>4 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
a1=rs3.recordcount
' Rs4.open "select * from Memorabilia where Code LIKE '15-%' ", conn,adOpenKeyset, adLockPessimistic, adCmdText
' m1=rs4.recordcount+c1
Rs5.open "select * from shahidmain where gro=1 and number <= 290 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
while not rs5.eof
cod=rs5("code")
Set RSAction=Server.CreateObject("ADODB.RecordSet")
rsAction.open "select * from radepaActions where shcode='"&cod&"' and ind<>0 ",conn, adOpenKeyset, adLockPessimistic, adCmdText
countAction=RsAction.recordcount
if countAction>3 then m1=m1+1
rs5.movenext
wend
rs.close
rs2.close
rs3.close
rs5.close



Rs.open "select * from shahidmain where gro=2 and number <= 290 order by family", conn,adOpenKeyset, adLockPessimistic, adCmdText
c2=rs.recordcount 'ترور
while not rs.eof
m2=m2+rs("MemorabiliaCount")
rs.movenext
wend
m2=m2+c2
Rs2.open "select * from shahidmain where gro=2 and img=1 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
p2=rs2.recordcount
Rs3.open "select * from shahidmain where gro=2 and AlbumCount>4 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
a2=rs3.recordcount
' Rs4.open "select * from Memorabilia where Code LIKE '13-%' ", conn,adOpenKeyset, adLockPessimistic, adCmdText
' m2=rs4.recordcount +c2

Rs5.open "select * from shahidmain where gro=2 and number <= 290 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
while not rs5.eof
cod=rs5("code")
Set RSAction=Server.CreateObject("ADODB.RecordSet")
rsAction.open "select * from radepaActions where shcode='"&cod&"' and ind<>0 ",conn, adOpenKeyset, adLockPessimistic, adCmdText
countAction=RsAction.recordcount
if countAction>3 then m2=m2+1
rs5.movenext
wend
rs.close
rs2.close
rs3.close
'rs4.close
rs5.close


Rs.open "select * from shahidmain where gro=3 and number <= 290 order by family", conn,adOpenKeyset, adLockPessimistic, adCmdText
c3=rs.recordcount 'صدراسلام
while not rs.eof
m3=m3+rs("MemorabiliaCount")
rs.movenext
wend
m3=m3+c3
Rs2.open "select * from shahidmain where gro=3 and img=1 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
p3=rs2.recordcount
Rs3.open "select * from shahidmain where gro=3 and AlbumCount>4 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
a3=rs3.recordcount
' Rs4.open "select * from Memorabilia where Code LIKE '11-%' ", conn,adOpenKeyset, adLockPessimistic, adCmdText
' m3=rs4.recordcount+c3
rs.close
rs2.close
rs3.close
' rs4.close


Rs.open "select * from shahidmain where gro=4 and number <= 290 order by family", conn,adOpenKeyset, adLockPessimistic, adCmdText
c4=rs.recordcount 'تابهمن 57
while not rs.eof
m4=m4+rs("MemorabiliaCount")
rs.movenext
wend
m4=m4+c4

Rs2.open "select * from shahidmain where gro=4 and img=1 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
p4=rs2.recordcount
Rs3.open "select * from shahidmain where gro=4 and AlbumCount>4 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
a4=rs3.recordcount
' Rs4.open "select * from Memorabilia where Code LIKE '12-%' ", conn,adOpenKeyset, adLockPessimistic, adCmdText
' m4=rs4.recordcount +c4
rs.close
rs2.close
rs3.close
' rs4.close

m5=0
Rs.open "select * from shahidmain where gro=5 and number <= 290 order by family", conn,adOpenKeyset, adLockPessimistic, adCmdText
c5=rs.recordcount 'دفاع مقدس
while not rs.eof
m5=m5+rs("MemorabiliaCount")
rs.movenext
wend
m5=m5+c5
Rs2.open "select * from shahidmain where gro=5 and img=1 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
p5=rs2.recordcount
Rs3.open "select * from shahidmain where gro=5 and AlbumCount>4 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
a5=rs3.recordcount
Rs5.open "select * from shahidmain where gro=5 and number <= 290 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
while not rs5.eof
cod=rs5("code")
Set RSAction=Server.CreateObject("ADODB.RecordSet")
rsAction.open "select * from radepaActions where shcode='"&cod&"' and ind<>0 ",conn, adOpenKeyset, adLockPessimistic, adCmdText
countAction=RsAction.recordcount
if countAction>3 then m5=m5+1
rs5.movenext
wend

rs.close
rs2.close
rs3.close
rs5.close

Rs.open "select * from shahidmain where gro=6 and number <= 290 order by family", conn,adOpenKeyset, adLockPessimistic, adCmdText
c6=rs.recordcount 'جهان اسلام
while not rs.eof
m6=m6+rs("MemorabiliaCount")
rs.movenext
wend
m6=m6+c6
Rs2.open "select * from shahidmain where gro=6 and img=1 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
p6=rs2.recordcount
Rs3.open "select * from shahidmain where gro=6 and AlbumCount>4 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
a6=rs3.recordcount
' Rs4.open "select * from Memorabilia where Code LIKE '16-%' ", conn,adOpenKeyset, adLockPessimistic, adCmdText
' m6=rs4.recordcount+c6
rs.close
rs2.close
rs3.close
' rs4.close



Rs.open "select * from shahidmain where gro=7 and number <= 290 order by family", conn,adOpenKeyset, adLockPessimistic, adCmdText
c7=rs.recordcount 'جانبازان شهید
while not rs.eof
m7=m7+rs("MemorabiliaCount")
rs.movenext
wend
m7=m7+c7
Rs2.open "select * from shahidmain where gro=7 and img=1 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
p7=rs2.recordcount
Rs3.open "select * from shahidmain where gro=7 and AlbumCount>4 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
a7=rs3.recordcount
Rs5.open "select * from shahidmain where gro=7 and number <= 290 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
while not rs5.eof
cod=rs5("code")
Set RSAction=Server.CreateObject("ADODB.RecordSet")
rsAction.open "select * from radepaActions where shcode='"&cod&"' and ind<>0 ",conn, adOpenKeyset, adLockPessimistic, adCmdText
countAction=RsAction.recordcount
if countAction>3 then m7=m7+1
rs5.movenext
wend

rs.close
rs2.close
rs3.close
rs5.close

Rs.open "select * from shahidmain where gro=8 and number <= 290 order by family", conn,adOpenKeyset, adLockPessimistic, adCmdText
c8=rs.recordcount 'تفحص
while not rs.eof
m8=m8+rs("MemorabiliaCount")
rs.movenext
wend
m8=m8+c8

Rs2.open "select * from shahidmain where gro=8 and img=1 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
p8=rs2.recordcount
Rs3.open "select * from shahidmain where gro=8 and AlbumCount>4 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
a8=rs3.recordcount
' Rs4.open "select * from Memorabilia where Code LIKE '18-%' ", conn,adOpenKeyset, adLockPessimistic, adCmdText
' m8=rs4.recordcount+c8
Rs5.open "select * from shahidmain where gro=8 and number <= 290", conn,adOpenKeyset, adLockPessimistic, adCmdText
while not rs5.eof
cod=rs5("code")
Set RSAction=Server.CreateObject("ADODB.RecordSet")
rsAction.open "select * from radepaActions where shcode='"&cod&"' and ind<>0 ",conn, adOpenKeyset, adLockPessimistic, adCmdText
countAction=RsAction.recordcount
if countAction>3 then m8=m8+1
rs5.movenext
wend

rs.close
rs2.close
rs3.close
rs5.close

m9=0
Rs.open "select * from shahidmain where gro=9 and number <= 290 order by family", conn,adOpenKeyset, adLockPessimistic, adCmdText
c9=rs.recordcount 'مبارزه باضد انقلاب واشرار
' response.write(c9)
while not rs.eof
m9=m9+rs("MemorabiliaCount")
rs.movenext
wend
m9=m9+c9
Rs2.open "select * from shahidmain where gro=9 and img=1 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
p9=rs2.recordcount
Rs3.open "select * from shahidmain where gro=9 and AlbumCount>4 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
a9=rs3.recordcount
'Rs4.open "select * from Memorabilia where Code LIKE '19-%' ", conn,adOpenKeyset, adLockPessimistic, adCmdText
'm9=rs4.recordcount+c9
Rs5.open "select * from shahidmain where gro=9 and number <= 290", conn,adOpenKeyset, adLockPessimistic, adCmdText
while not rs5.eof
cod=rs5("code")
Set RSAction=Server.CreateObject("ADODB.RecordSet")
rsAction.open "select * from radepaActions where shcode='"&cod&"' and ind<>0 ",conn, adOpenKeyset, adLockPessimistic, adCmdText
countAction=RsAction.recordcount
if countAction>3 then m9=m9+1
rs5.movenext
wend
rs.close
rs2.close
rs3.close
' rs4.close
rs5.close

Rs.open "select * from shahidmain where gro=10 and number <= 290 order by family", conn,adOpenKeyset, adLockPessimistic, adCmdText
c10=rs.recordcount 'حین انجام ماموریت
while not rs.eof
m10=m10+rs("MemorabiliaCount")
rs.movenext
wend
m10=m10+c10


Rs2.open "select * from shahidmain where gro=10 and img=1 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
p10=rs2.recordcount
Rs3.open "select * from shahidmain where gro=10 and AlbumCount>4 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
a10=rs3.recordcount
' Rs4.open "select * from Memorabilia where Code LIKE '20-%' ", conn,adOpenKeyset, adLockPessimistic, adCmdText
' m10=rs4.recordcount+c10
Rs5.open "select * from shahidmain where gro=10 and number <= 290", conn,adOpenKeyset, adLockPessimistic, adCmdText
while not rs5.eof
cod=rs5("code")
Set RSAction=Server.CreateObject("ADODB.RecordSet")
rsAction.open "select * from radepaActions where shcode='"&cod&"' and ind<>0 ",conn, adOpenKeyset, adLockPessimistic, adCmdText
countAction=RsAction.recordcount
if countAction>3 then m10=m10+1
rs5.movenext
wend

rs.close
rs2.close
rs3.close
'rs4.close
rs5.close

m11=0
Rs.open "select * from shahidmain where gro=11 and number <= 290 order by family", conn,adOpenKeyset, adLockPessimistic, adCmdText
c11=rs.recordcount 'مبارزه با مواد مخدر
while not rs.eof
m11=m11+rs("MemorabiliaCount")
rs.movenext
wend
m11=m11+c11


Rs2.open "select * from shahidmain where gro=11 and img=1 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
p11=rs2.recordcount
Rs3.open "select * from shahidmain where gro=11 and AlbumCount>4 ", conn,adOpenKeyset, adLockPessimistic, adCmdText
a11=rs3.recordcount
' Rs4.open "select * from Memorabilia where Code LIKE '21-%' ", conn,adOpenKeyset, adLockPessimistic, adCmdText
' m11=rs4.recordcount+c11
Rs5.open "select * from shahidmain where gro=11 and number <= 290", conn,adOpenKeyset, adLockPessimistic, adCmdText
while not rs5.eof
cod=rs5("code")
Set RSAction=Server.CreateObject("ADODB.RecordSet")
rsAction.open "select * from radepaActions where shcode='"&cod&"' and ind<>0 ",conn, adOpenKeyset, adLockPessimistic, adCmdText
countAction=RsAction.recordcount
if countAction>3 then m11=m11+1
rs5.movenext
wend

rs.close
rs2.close
rs3.close
rs5.close

%>

M-Gheibi
چهارشنبه 04 مهر 1386, 16:04 عصر
خب دلیل نمایش این خطا وجود رکوردست‌های خیلی زیاده که طبیعیه مشکل ساز بشه . باز و بسته شدن‌های متوالی .
با توجه به نوع کاری که انجام می‌دید سعی کنید این کدنویسی‌ها رو کم کنید . هرچقدر بتونید تعداد درخواست‌های ارسالی به بانک رو کمتر کنید بهتر نتیجه می‌گیرید .

mostafa612003
یک شنبه 15 مهر 1386, 12:50 عصر
یعنی راه حل دیگری نیست؟

hector2000
سه شنبه 17 مهر 1386, 14:08 عصر
دوست گرامی خیلی کدت را پیچیده نوشتی.این امکان پذیر است که این کد را ساده تر بنویسی و از رکوردست های کمتری هم استفاده کنی.