-
Notifications
You must be signed in to change notification settings - Fork 107
Execution halted with large queries #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Could you please try with the dev version? |
hadley. |
thanks. i will give it a go in the next couple of days. |
Was a solution to this every figured out? (I am trying to solve a similar problem with the same error message.) |
@noktilux: Any updates here? @MJFitzpatrick86: Could you please post a reproducible example? |
I am facing the same problem. Trying to fetch data for thousand companies in a loop. After 30-40 companies it generates the above error. Even dev version has this issue. I get the following error Error in validObject(.Object) : I had to use version 0.9.3. But that version sometimes generates "caught segfault" error. |
@realgithup we can't help with a reproducible example |
This is a real bug although it does seem to be one of those nasty "sometimes" errors. I got this error running an R script and then re-ran the same script on the same machine, absolutely no changes, no restarting MySQL, and it worked just fine. |
Hi, I dont know if this can help : if I add the line "dbColumnInfo(con, table) just before the call to the dbGetQuery call, the query is executed without any error (with table=the table used in dbGetQuery). SessionInfo(): locale: attached base packages: other attached packages: Best. |
@cturbelin: Thanks. The R code and a dump of the database schema could help narrow down this issue. |
@cturbelin: Confirmed that your I have been seeing this error on Mac OSX once in a while when I was running repetitive big queries.
But, when I moved to a Docker container running Debian 8.3, one of those repetitive big queries never worked. Same database server...
When I called the PS: The R routine is basically iterating over a stock symbols vector of length ~8000, and issuing an SQL query to retrieve their OHLC series from the database. Simple query, simple DB structure. |
OK, I have experienced another problem which looks like related to this. As mentioned in the my previous comment, we have been calling the
Yesterday, our system has stopped in the middle of the day with this error message, right after printing the output of the first
(Why does the call trace state Now... I know that we are running state machines and such errors must be reproducable. However, same Docker image running on local machine worked fine with the same database dump. Going back to the server experiencing the problem, I've added a print statement for debugging purposes and it worked everytime when the script is run:
(Yep, I am surprised, too.) I have quickly checked the C code for a possible problem in result set management, but couldn't find any. It looks short, precise and perfectly fine. Then guess what: I have removed the blind hack entirely (including the I am entirely clueless and don't want to waste package contributors' time... Could you address some functions in R and/or C/++ code which I can play with and see if I can produce some meaningful debugging information? |
Hack to try to address this bug: r-dbi/RMySQL#40
I am running into a similar issue. When running a sequence of queries using |
Impressively, here the same "blind hack" worked. I'm doing a big query with 5 left joins.
|
Similar issue. Same workaround solved it. |
Executing via
In R terminal, the error is
or
|
Through some experiments, I find that when |
When I adjust |
@renkun-ken The "adjust MySQL() to MySQL(fetch.default.rec = 10000) then the error is magically gone" |
|
Queries that run without any issues in version "0.9-3' now do not work in "0.10.1".
In one of my tests, I removed columns one by one and things worked properly when I got down to 203 columns. I thought perhaps there was a problem with the last one I removed, but that is not the case. If I remove another one instead, the same issue occurs. This is the message:
In another situation (involving a JOIN of 2 tables), if I list out all the columns (270 in total), the query works, but if I write it as SELECT table1., table2. FROM ... , then it fails. The message is:
To repeat, the queries are all valid and work perfectly in MySQL (issuing direct commands) and in the older version of this library (RMySQL 0.9-3) which I have installed on another machine.
I have placed a test schema for you here:
https://heartsys.org/share/foo.tar.gz
Simply run "SELECT * FROM foo.tbl" to reproduce issue #1.
P.S. This is the version of R I am running:
R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
The text was updated successfully, but these errors were encountered: