-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Make sure cursors are closed everywhere / Database is locked #10566
Comments
a hint: http://php.net/manual/de/pdo.query.php
|
and from http://www.sqlite.org/opcode.html#OpenRead
So, when a |
Side-note: I'm now struggling with Oracle problems now after adding |
did you see http://www.doctrine-project.org/jira/browse/DC-509? it mentions a fix in derflocki/doctrine1@47b926a quite a dated bug ... I wonder if the fix still applies |
Now this seems interesting end exactly the kind of crappy hacking needed to get oracle working http://php.net/manual/de/function.oci-free-statement.php#81577 Now investigating if doctrine does free the cursor AND the statement. |
Not sure, but on my test machine I had to increase the number of cursors because I was getting "Max cursors reached" when running all unit tests on Oracle. The issue I'm having now is different, see #7539 (comment) |
I don't think we want to risk introducing regressions in OC 7 by adding cursor closing everywhere ? |
@butonic @DeepDiver1975 do you guys have an idea what happened with the "busyTimeout()" setting that we had in OC 7? |
From the stack trace it also looks like it was executed from inside the change propagator's |
Just removed around 30 files locally from the sync directory, the delete propagation to owncloud server post 8.0 release (SHA ac13cf0) has internal server errors (client 1.8.0 beta1):
|
This seems to be the code for that query: https://github.com/owncloud/core/blob/master/lib/private/files/cache/cache.php#L370 Did you remove only files but also directories ? There seems to be a code path that would also delete child entries. |
The I also see that That might be another argument to always explicitly close cursors and NEVER rely on the garbage collector. @dragotin I get you aren't able to reproduce this consistently ? We could try and close the cursor there and see if it still happens. |
I removed only files in this case. I can not really reproduce it, but it shows for me with good frequency when I remove a not too small amount of files locally (lets say 25). |
@dragotin does the client also delete in parallel by sending multiple HTTP requests ? |
Tagging this as junior job: there are many cases where it is easy to change the code to close the cursor. PRs can be sent separately instead of a huge PR with everything, to make it easier to review and do regression testing on specific pieces of OC. Complex cases can be left out to be tackled by non-juniors separately 😄 |
Had a chat with @dragotin and he found cases where we cannot rely on the garbage collector. |
@karlitschek @cmonteroluque To late in the dev cycle - I suggest to postpone this to 9.0 or even backlog - THX |
yes. too late for proper testing anyways |
ok |
Hey, this issue has been closed because the label (This is an automated comment from GitMate.io.) |
Haven't heard of such issues any more, leaving closed. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This follows my discovery here: #7539 (comment)
In some cases when prepared statements are used, if the cursors aren't closed explicitly, there is a higher risk to run into "Database is locked" issues on SQLite (and maybe max cursors reached on Oracle). We cannot rely on garbage collection to free these resources.
We should go through the core code and find the prepared statements that aren't closed explicitly.
The most likely to cause trouble is ones that might be called repeatedly or the ones defined as class attributes instead of local variables.
What do you think ?
@karlitschek @bantu @icewind1991 @DeepDiver1975 @th3fallen @butonic
The text was updated successfully, but these errors were encountered: