Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: [Mysql-protocol] timeout problem

From: hallvard:ystad:oops-as:no at: 12-May-2004 1:22

Dixit Hallvard Ystad:
>>> Hi >>> >>> I have some files with data that I load into a MySQL database using LOAD DATA INFILE. They take some time to load, and I often get a timeout error when using DocKimbel's mysql-protocol.r. It seems to happen after about 30 seconds. >>> >>> I looked through mysql-protocol.r for a 'timout parameter or something, but I didn't find anything of interest. Rebol's disarmed error seems to say the timout occurs in 'read. Has anyone else had this problem? What should I do? >>> >>> Regards, >>> HY
Here are some more information. I redirected 'print thus: ; for debugging purposes. debug: func [value] [ nl: either #"^/" = first value [remove value "^/"] [""] prin rejoin [nl now/precise ": " value newline] ] print: :debug and then sat (sat? turned!) trace/net on. Here's what I got when sending LOAD DATA INFILE to MySQL: Net-log: 12-May-2004/0:37:45.663555+2:00: "sending ping..." Net-log: 12-May-2004/0:37:45.664715+2:00: ["low level read of " 4 "bytes"] Net-log: 12-May-2004/0:37:45.665227+2:00: ["low level read of " 3 "bytes"] 12-May-2004/0:38:15.675572+2:00: make object! [ code: 512 type: 'access id: 'timeout [...] where: 'read ] Since I do a cleanup in case of errors, here's what happens when the script tries to send the exact same command (LOAD DATA INFILE) once more (but this time, although the content is the same, the infile has some other name): Net-log: 12-May-2004/0:38:15.869467+2:00: "flushing unread data..." Net-log: 12-May-2004/0:38:25.582251+2:00: ["low level read of " 57 "bytes"] Net-log: 12-May-2004/0:38:25.582766+2:00: "flush end." Net-log: 12-May-2004/0:38:25.583148+2:00: "sending ping..." Net-log: 12-May-2004/0:38:31.977163+2:00: ["low level read of " 4 "bytes"] Net-log: 12-May-2004/0:38:31.977839+2:00: ["low level read of " 3 "bytes"] Net-log: 12-May-2004/0:38:32.029077+2:00: ["low level read of " 4 "bytes"] Net-log: 12-May-2004/0:38:32.029754+2:00: ["low level read of " 55 "bytes"] Remarks: 1) Pretty exactly 30 seconds ! 2) Data is left in the buffer / unread from port connection. This suggests that for some reason, the 'read-packet method (in mysql-protocol.r) never reaches the command pl/stream-end?: true (just before line 500). Hm. Hm. Hm. Hm.allvard