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
Cachalot error #81
Comments
Do you change the |
@BertrandBordage Thank you for responding. The test database is created dynamically each time the test is run. |
I meant, do you explicitly change these settings during tests? |
no they are not changed explicitly during tests |
Is that possible for you to switch this particular project to django 1.8, 1.10 or 1.11 to test with django-cachalot 1.5.0? |
we are in the process of upgrading to django 1.11. thanks, |
Maybe 1.5.0 could avoid this issue, as it contains many refactorings. |
I see. Its not open source. these are the settings im using: |
Got same failures with cachalot 1.5 version too.. :( |
Fixed by 6e429fd. |
IndexError: pop from empty list
|
Still getting |
Same problem. I can't reproduce it reliably as it only occurs after the server runs for a while. |
Please try with django-cachalot 2.0.2, I made a workaround that should fix this. |
Hi guys, No specific settings, just the defaults. |
We have also experienced this issue with: django==3.1.1
Error was |
Hey @cfobel if you're using a virtualenv, if you don't mind, try putting the following print statements in # before L39
print("1a", self.atomic_caches, db_alias)
# b4 L44
print("1e", self.atomic_caches, db_alias) The point is just to see if it's actually going to be atomic. In Those are just my guesses though. |
I am getting this with 2.4.5 on local host w/ locmemcache. Also running the django-debug-toolbar panel |
Is this reproducible? Sample project? Is it something I can run 100 times and get this error to pop up once? Are you multithreading by chance? Can you provide a piece of code to demonstrate how the Atomic object changed during your transaction as in the original poster? |
No it's not reproducible - I wish it was so I could give a more concrete error report. I do have a sample app, and I think I was running in multi threaded under django-extensions' runserver_plus (so the werkzueg runner). On thinking about it more I think something odd might have happened with a debug thread + a reload. If I'm able to repro I'll provide more info. |
Using django-cachalot 2.4.4, django 3.1.13, same error:
Maybe it thinks it has a cache, but it already deleted the old one and is trying to do it again in the empty list? This error happens when refreshing multiple times the page, going back and forth, a bit of patience is needed until the error pops up. I couldn't find a way to reproduce it, and the code I'm running is not open source, so I don't have more details, but when this error happens, it keeps happening until the docker container we're using for the app is restarted. |
Getting this error , with cachalot enabled ., when running unit testcases.
backend cache is BACKEND': 'django_redis.cache.RedisCache'
File "/home/ubuntu/virtualenvs/venv-system/lib/python2.7/site-packages/django/db/migrations/executor.py", line 198, in apply_migration
state = migration.apply(state, schema_editor)
File "/home/ubuntu/virtualenvs/venv-system/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 92, in exit
self.atomic.exit(exc_type, exc_value, traceback)
File "/home/ubuntu/virtualenvs/venv-system/lib/python2.7/site-packages/cachalot/monkey_patch.py", line 146, in inner
self.using, exc_type is None and not needs_rollback)
File "/home/ubuntu/virtualenvs/venv-system/lib/python2.7/site-packages/cachalot/cache.py", line 47, in exit_atomic
atomic_caches = self.atomic_caches[db_alias].pop().values()
IndexError: pop from empty list
can you please help with this?
The text was updated successfully, but these errors were encountered: