Autor Beitrag
FriFra
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 557

Win XP Prof, Win XP Home,Win Server 2003,Win 98SE,Win 2000,Win NT4,Win 3.11,Suse Linux 7.3 Prof,Suse Linux 8.0 Prof
D2k5 Prof, D7 Prof, D5 Standard, D3 Prof, K3 Prof
BeitragVerfasst: Mo 10.05.04 10:10 
Ich habe den Timeout auf 3 Sekunden eingestellt, aber der Thread hängt beim Aufruf einer nicht antwortenden Webseite mehrere Minuten fest! Hat jemand eine Idee, was man da machen kann?

_________________
Michael
(principal certified lotus professional - developer)
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mo 10.05.04 14:11 
also normalerweise wird dann ne exception ausgelößt. pack mal den http befehl in ein try except rein !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
FriFra Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 557

Win XP Prof, Win XP Home,Win Server 2003,Win 98SE,Win 2000,Win NT4,Win 3.11,Suse Linux 7.3 Prof,Suse Linux 8.0 Prof
D2k5 Prof, D7 Prof, D5 Standard, D3 Prof, K3 Prof
BeitragVerfasst: Mo 10.05.04 17:45 
Aber bis die Exception ausgelöst wird können mehrere Minuten vergehen!!! Deshalb benötige ich unbedingt einen funktionierenden Timeout...

_________________
Michael
(principal certified lotus professional - developer)
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mo 10.05.04 18:43 
evtl. erzeugt der server gar keinen timeout, sondern liefert nur seine daten unendlich langsam an dich ???

_________________
In the beginning was the word.
And the word was content-type: text/plain.
FriFra Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 557

Win XP Prof, Win XP Home,Win Server 2003,Win 98SE,Win 2000,Win NT4,Win 3.11,Suse Linux 7.3 Prof,Suse Linux 8.0 Prof
D2k5 Prof, D7 Prof, D5 Standard, D3 Prof, K3 Prof
BeitragVerfasst: Mo 10.05.04 18:56 
genau dass ist das Problem... dafür ist ja eigentlich der Client-Timeout da... wenn die Seite nicht nach 3 Sekunden geladen wurde, dann will ich einen Abbruch ohne diese sinnlose, systemblockierende Warterei.

_________________
Michael
(principal certified lotus professional - developer)
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mo 10.05.04 20:33 
ja die seite wird anscheinend ja geladen, allerding schiebt der server nu erdammt lahm. der timeout wird nur ausgelößt, wenn der server in der vorgegeben zeit nicht mit daten antowortet.
auf welchen server willste dich denn verbinden ?

_________________
In the beginning was the word.
And the word was content-type: text/plain.
FriFra Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 557

Win XP Prof, Win XP Home,Win Server 2003,Win 98SE,Win 2000,Win NT4,Win 3.11,Suse Linux 7.3 Prof,Suse Linux 8.0 Prof
D2k5 Prof, D7 Prof, D5 Standard, D3 Prof, K3 Prof
BeitragVerfasst: Mo 10.05.04 20:40 
Ich rufe ein Script auf, welches prüft, ob ein bestimmter Port korrekt freigegeben wurde... Das Script versucht also eine Seite eines lokalen Servers von aussen zu laden. Falls das Port-forwarding nicht korrekt funktioniert braucht das Script extrem lange... allerdings gibt es für PHP keine brauchbare Möglichkeit einen Timeout anzugeben.

Ich muss also meinen Client irgendwie dazu bringen es nach 3 Sekunden knallhart abzubrechen, egal ob schon Fragmente da sind oder nicht, es soll einfach abgebrochen werden und Fertig.

_________________
Michael
(principal certified lotus professional - developer)
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Di 11.05.04 10:41 
hmmm. ich weiss lieder nicht, wie du die indy kompo dazu bringen kannst die aktion abzubrechen, allerdings kannst du bei PHP sehr wohl nen timeout angeben !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
FriFra Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 557

Win XP Prof, Win XP Home,Win Server 2003,Win 98SE,Win 2000,Win NT4,Win 3.11,Suse Linux 7.3 Prof,Suse Linux 8.0 Prof
D2k5 Prof, D7 Prof, D5 Standard, D3 Prof, K3 Prof
BeitragVerfasst: Di 11.05.04 20:59 
matze hat folgendes geschrieben:
hmmm. ich weiss lieder nicht, wie du die indy kompo dazu bringen kannst die aktion abzubrechen, allerdings kannst du bei PHP sehr wohl nen timeout angeben !


Angeben kann man den Timeout im PHP schon, nur hängt die Berücksichtigung dieser Angabe stark von der Serverkonfiguration ab... Praktisch ist es so, das es mit 99% Sicherheit nicht funzt.

Ich hab das Problem jetzt aber gelöst bekommen ;)
Bisher hatte ich immer nur den ConnectTimeout eingestellt und dabei völlig übersehen, dass es ja noch einen ReadTimeout gibt - damit hat es dann auf Anhieb geklappt
:dance: :dance2:

_________________
Michael
(principal certified lotus professional - developer)
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mi 12.05.04 12:08 
achso. ich hatte angenommen, dass du den hernimmst !

_________________
In the beginning was the word.
And the word was content-type: text/plain.
FriFra Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 557

Win XP Prof, Win XP Home,Win Server 2003,Win 98SE,Win 2000,Win NT4,Win 3.11,Suse Linux 7.3 Prof,Suse Linux 8.0 Prof
D2k5 Prof, D7 Prof, D5 Standard, D3 Prof, K3 Prof
BeitragVerfasst: Mi 12.05.04 20:03 
matze hat folgendes geschrieben:
achso. ich hatte angenommen, dass du den hernimmst !


Manchmal sieht man ebenden Wald vor Bäumen nicht :oops: ...

_________________
Michael
(principal certified lotus professional - developer)