Arsip: lost connection to mysql server during query
more 15 years ago
rey1024
saya kadang2 menemukan pesan : "lost connection to mysql server during query". Kira2 permasalahannya dimana ya?
thxx
NB:
dalam aplikasi yang saya buat, saya membuat 2 thread yang isinya melakukan pengecekan apakah ada data baru masuk. komponen yang saya gunakan ztable. Sleepnya saya gunakan 3000 (3 detik)
TRefInbox = class(TThread)
private
TlblStatus:TLabel;
Twaktu:integer;
TztbInbox, TztbInboxTemp:Tztable;
jumlahSMSInbox:Integer;
protected
procedure Execute; override;
procedure refZtb;
public
constructor create(var ztblInbox:TZTable; waktu:integer; var lblSTS:TLabel);
end;
constructor TRefInbox.Create(var ztblInbox:Tztable; waktu:integer; var lblSTS:TLabel);
begin
TztbInbox:=Tztable.create(nil);
TztbInboxTemp:=Tztable.create(nil);
TztbInboxTemp.Connection:=dm.ZCon;
TztbInboxTemp.TableName:='inbox';
TztbInbox:=ztblInbox;
TlblStatus:=TLabel.Create(nil);
TlblStatus:=lblSTS;
Twaktu:=waktu;
FreeOnTerminate:=True;
inherited Create(true);
end;
procedure TRefInbox.Execute;
begin
while not Terminated do
begin
try
Synchronize(refZtb);
Sleep(Twaktu);
except on E:EDatabaseError do
end;
end;
end;
procedure TRefInbox.refZtb;
begin
TztbInboxTemp.Active:=false;
TztbInboxTemp.Active:=True;
if jumlahSMSInbox<>TztbInboxTemp.RecordCount then
begin
TztbInbox.Active:=False;
TztbInbox.Active:=true;
jumlahSMSInbox:=TztbInboxTemp.RecordCount;
end;
end;
[/code]
more 15 years ago
Manz
lost connection to mysql server during queryIni diakibatkan karena pada saat melakukan large querying ke database. Jadi mungkin mysql anda mempunyai time limit atau wait_timeout secara default, dan allowing package yang boleh dan bisa di transfer itu ukurannya kecil. Coba bro rey1024 bisa mengubah setting di mysql menjadi : pada bagian [mysqld] ... wait_timeout=2147483 max_allowed_packet=1024M ... nah, itu wait_timeout kita menggunakan nilai maximum dan max_allowed_packet sebesar 1G querying ... Kalo untuk max_allowed_packet lebih baik sesuai dengan memory physical anda, misal untuk good optimizer sebesar 50% dari physical. Begetoo ... IMHO :mrgreen: Man'z
more 15 years ago
supermuam
aku pernah ngalamin ini juga..karena server yang gak kuat meload data yang besar n bersamaan..jadi begini
aku besarin deh max_allowed_packet nya..kadang kadang masih muncul..hehehe..tapi cukup membantu jg kok.
more ...
- Pages:
- 1
reply |
Report Obsolete
Last Articles
Last Topic
- PascalTalk #6: (Podcast) Kuliah IT di luar negeri, susah gak sih?
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #5: UX: Research, Design and Engineer
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #4: Obrolan Ringan Seputar IT
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #2: Membuat Sendiri SMART HOME
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #3: RADically Fast and Easy Mobile Apps Development with Delphi
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #1: Pemanfaatan Artificial Intelligence di Masa Covid-19
by LuriDarmawan in Tutorial & Community Project more 4 years ago - Tempat Latihan Posting
by LuriDarmawan in OOT more 4 years ago - Archive
- Looping lagi...
by idhiel in Hal umum tentang Pascal Indonesia more 12 years ago - [ask] koneksi ke ODBC user Dsn saat runtime dengan ado
by halimanh in FireBird more 12 years ago - Validasi menggunakan data tanggal
by mas_kofa in Hal umum tentang Pascal Indonesia more 12 years ago
Random Topic
- cara mengatasi program lambat gara2 field blob?
by grounders in Tip n Trik Pemrograman more 18 years ago - menjumlahkan data
by bogem in OOT more 16 years ago - tanya tentang dll
by hendra_sir84 in Hal umum tentang Pascal Indonesia more 16 years ago - TMU Printer komponen u/ printer kasir & dot matrik
by MrLee in Reporting more 15 years ago - Trace di delphi, please help..
by langithitam in Hal umum tentang Pascal Indonesia more 15 years ago - Hapus Data di Database Menggunakan Listview Checkbox
by mrajex in Lain-lain more 13 years ago - recovery ms sql server 2000
by ndenkltop in Lain-lain more 17 years ago - [ask]algoritma untuk program administrasi tempat kursus....
by R960XT in Enginering more 18 years ago - Minimize
by p2bf in Tip n Trik Pemrograman more 17 years ago - Bisakah Rave Report Pake 2 Connection ???
by spiky in Hal umum tentang Pascal Indonesia more 13 years ago