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

[Mysql-protocol] timeout problem

 [1/6] from: hallvard::ystad::oops-as::no at: 11-May-2004 12:53


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

 [2/6] from: tomc:darkwing:uoregon at: 11-May-2004 9:20


have you tried setting auto-ping to on ? On Tue, 11 May 2004, Hallvard Ystad wrote:

 [3/6] from: hallvard:ystad:oops-as:no at: 11-May-2004 22:47


Dixit Tom Conlin (18.20 11.05.2004):
>have you tried setting auto-ping to on ?
Thanks, but: 1) According to http://rebol.softinnov.org/mysql/usage.html, 'auto-ping? is set to 'on by default (just checked port/locals to make sure). 2) This is a problem that arises after a certain time (I think 30 seconds). After that time, I still see the connection with SHOW PROCESSLIST. 'Auto-ping? will reconnect if connection is lost _before_ I do an insert, and I have a connection that times out _during_ LOAD DATA INFILE. HY

 [4/6] from: hallvard:ystad:oops-as:no at: 12-May-2004 1:22


Dixit Hallvard Ystad:
>>> Hi >>>
<<quoted lines omitted: 4>>
>>> 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

 [5/6] from: reblist:codeconscious at: 12-May-2004 10:49


I don't know anything about using mysql-protocol.r, but REBOL does have timeout settings. From the Core manual: .... you can set network timeout values for all of the schemes (in the default) or for specific schemes. For instance, to increase the timeout for all schemes, you can write: system/schemes/default/timeout: 0:05 This sets the network timeout for 5 minutes. If you want to increase the timeout just for SMTP, you would write: system/schemes/smtp/timeout: 0:10 Check your current settings you will probably find it is 30 (btw an integer). I'm not sure when the timeout setting takes effect - so consider changing the default timeout before you load mysql-protocol.r as a first attempt. Separately try: system/schemes/mysql/timeout: 60 HTH Brett ----- Original Message ----- From: "Hallvard Ystad" 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?

 [6/6] from: hallvard:ystad:oops-as:no at: 12-May-2004 13:45


Hi Brett, I should have thought about that! Works fine now, thanks! HY Dixit Brett Handley (02.49 12.05.2004):

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted