You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using version 2.0.0-alpha8 and node v0.10.11 and am experiencing an issue where I'm getting a lost connection error while streaming the results of a query.
I realize there are a number of issues relating to lost connections. And I've seen solutions like connection.ping() to avoid an idle connection timeout, or connection.on('error') handlers to re-establish a severed connection. Because my problem happens while a query is running, this seems like a different scenario than others have reported.
I am creating a fileWriteStream and piping the results of the SQL query into that writestream. I also have a CsvPrepStream in the pipeline which transforms the data object into a string of text suitable for a CSV.
This process runs just fine with ~200k or fewer results in the sql query. Bigger query results, however, cause the PROTOCOL_CONNECTION_LOST error after a minute or so.
I realize this doesn't give the full context of what's going on, but should give an idea:
I have been getting this error in a similar situation - in my case that gets this error, the time to process a row far exceeds the time for MySQL to send it to me (the network-level buffers are almost always full and the stream is almost always paused), and I usually get this error after 3-5 minutes (even though all MySQL timeouts are set to hours and, as far as I can tell, OS-level network/TCP timeouts are set to hours, and I even set .setKeepAlive on the TCP stream to MySQL, though I still suspect some OS-level timeout must be happening). In my case I just worked around it by catching the error and issuing a new query that starts where the old one left off (though that's not guaranteed to get the same results, since new things may have been written), but this would be good to investigate at some point.
I'm using version 2.0.0-alpha8 and node v0.10.11 and am experiencing an issue where I'm getting a lost connection error while streaming the results of a query.
I realize there are a number of issues relating to lost connections. And I've seen solutions like connection.ping() to avoid an idle connection timeout, or connection.on('error') handlers to re-establish a severed connection. Because my problem happens while a query is running, this seems like a different scenario than others have reported.
I am creating a fileWriteStream and piping the results of the SQL query into that writestream. I also have a CsvPrepStream in the pipeline which transforms the data object into a string of text suitable for a CSV.
This process runs just fine with ~200k or fewer results in the sql query. Bigger query results, however, cause the PROTOCOL_CONNECTION_LOST error after a minute or so.
I realize this doesn't give the full context of what's going on, but should give an idea:
The text was updated successfully, but these errors were encountered: