Skip to content
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

On Windows, importing or exporting a large number of items (~1000) can fail #3110

Closed
ghost opened this issue Jan 23, 2018 · 11 comments
Closed
Labels
bug Behavior is wrong or broken P0 - critical Priority: Release blocker or regression
Milestone

Comments

@ghost
Copy link

ghost commented Jan 23, 2018

Observed behavior

When trying to download content i get a transfer failed error. First channel downloaded in bulk ok but cannot download further channelsin bulk. If i go in and download sub categories i can eventually pull down the whole channel

Expected behavior

channel downloads as a whole not 1 by 1 resource sub sets

Errors and logs

�[33mWARNING  Job d416c174faeb4648b22bd1420a75f2a0 raised an exception: Traceback (most recent call last):
  File "c:\python27\lib\site-packages\kolibri\dist\iceqube\worker\backends\inmem.py", line 75, in handle_finished_future
    result = future.result()
  File "c:\python27\lib\site-packages\kolibri\dist\concurrent\futures\_base.py", line 455, in result
    return self.__get_result()
  File "c:\python27\lib\site-packages\kolibri\dist\concurrent\futures\thread.py", line 63, in run
    result = self.fn(*self.args, **self.kwargs)
  File "c:\python27\lib\site-packages\kolibri\dist\iceqube\worker\backends\inmem.py", line 149, in wrap
    raise e
OperationalError: too many SQL variables
�[0m
WARNING:iceqube.worker.backends.base:Job d416c174faeb4648b22bd1420a75f2a0 raised an exception: Traceback (most recent call last):
  File "c:\python27\lib\site-packages\kolibri\dist\iceqube\worker\backends\inmem.py", line 75, in handle_finished_future
    result = future.result()
  File "c:\python27\lib\site-packages\kolibri\dist\concurrent\futures\_base.py", line 455, in result
    return self.__get_result()
  File "c:\python27\lib\site-packages\kolibri\dist\concurrent\futures\thread.py", line 63, in run
    result = self.fn(*self.args, **self.kwargs)
  File "c:\python27\lib\site-packages\kolibri\dist\iceqube\worker\backends\inmem.py", line 149, in wrap
    raise e
OperationalError: too many SQL variables

Context

win 10 running kolibri 0.7.0. all browsers.

@jonboiser jonboiser added the bug Behavior is wrong or broken label Jan 29, 2018
@jonboiser
Copy link
Contributor

@edunetck Would you mind sharing details of which channels and sub-categories you attempted to import? Which worked, and which did not work?

@ghost
Copy link
Author

ghost commented Jan 29, 2018

Hi
Importing from Koilbri Online. Touchable Earth (337 resources) and Be Strong (65 resources) imoprted ok. The other channels wont bulk import - im guessing it may have something to do with the number of resources in each channel. For example i have nearly finished importing EngageNY but i have had to do it a couple of chapters at a time - each chapter having X number of resources. If i select too many chapters it will fail so have to reduce to 1,2 or 3 chapters at a time and the import works. If i select say 5 chapters and it fails i can go back and import each chapter individually andf it runs ok......

@jonboiser
Copy link
Contributor

@edunetck Thanks for the info. We will try to reproduce it on our side. I'll check the Engage NY channel to see what 1-5 chapters translates to in terms of resources.

To clarify, the largest number of chapters on Engage NY has been 3? But attempting 5 chapters fails?

@ghost
Copy link
Author

ghost commented Jan 29, 2018

it seems to fail if the total number of resources, irrespective of the number of chapters gets close to 1000 in one download. EngageNY has 8678 resources, each chapter is between 250 and 450 resources. sometimes i can get 3, sometimes 2 chapters. ANd yes - have not been able to get more than 3 chapters but ihavent speciffically gone and looked for all the 200 resource chapters just to try that scenario.

@ghost
Copy link
Author

ghost commented Jan 30, 2018

Grade 5 mathematics in EnganeNY (EN) wont import at all, get same failed error. All other chapters imported ok.

@ghost
Copy link
Author

ghost commented Jan 30, 2018

And now when Exporting facing the same issue.

@jonboiser
Copy link
Contributor

@edunetck I just tried an import of about 1200 resources from EngageNY and it was successful (on a MacOS computer). We will try to reproduce this on a Windows machine.

@indirectlylit indirectlylit added the TODO: needs gherkin update Add to our manual integration tests label Jan 31, 2018
@jonboiser
Copy link
Contributor

@edunetck @radinamatic Was able to reproduce the same exact error on a Windows 10 machine. In her case, the threshold was slightly under 1000 resources from EngageNY.

I will rename this issue to make it easier for others with the same problem to find it and we'll keep you posted on when it's resolved.

@jonboiser jonboiser changed the title Transfer Failed for multiple selects. On Windows, importing or exporting a large number of items (~1000) can fail Jan 31, 2018
@lauradanforth
Copy link

@indirectlylit indirectlylit added this to the 0.8.0 milestone Feb 1, 2018
@indirectlylit indirectlylit added the P0 - critical Priority: Release blocker or regression label Feb 1, 2018
@jamalex
Copy link
Member

jamalex commented Feb 7, 2018

Looks like it's due to the implementation of _get_leaves_ids in https://github.com/learningequality/kolibri/pull/2703/files (CC @lyw07 @aronasorman). We shouldn't be creating a list of leaf IDs, we should leverage django-mptt's hierarchical queries. I'll give it a shot; do we have any test coverage on this?

@jamalex
Copy link
Member

jamalex commented Feb 7, 2018

Fixed in #3163

rtibbles added a commit that referenced this issue Feb 7, 2018
Fix #3110: _get_leaf_node_ids returns embedded query instead of list
@radinamatic radinamatic removed the TODO: needs gherkin update Add to our manual integration tests label Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Behavior is wrong or broken P0 - critical Priority: Release blocker or regression
Projects
None yet
Development

No branches or pull requests

5 participants