Comments (2)
Thank you for the quick response, much appreciated !
I have a model "Record" which differ from other models only on two things
- Record inherit multiple abstract models
- Record is not cached by cacheops
The model definition is: classRecord(ModelDiffMixin, ModelMixinFoo, ModelMixin1Bar, models.Model):
The error happens when bootstrapping the project, the following is the full error trace log
[2023-05-17 14:08:06 +0200] [8] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/funcy/calc.py", line 59, in wrapper
return memory[key]
KeyError: (<class 'entity.Record'>,)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
worker.init_process()
File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process
self.load_wsgi()
File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
self.wsgi = self.app.wsgi()
File "/usr/local/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/usr/local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
return self.load_wsgiapp()
File "/usr/local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
return util.import_app(self.app_uri)
File "/usr/local/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
mod = importlib.import_module(module)
File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/code/creator/wsgi.py", line 18, in <module>
application = StaticFilesHandler(get_wsgi_application())
File "/usr/local/lib/python3.9/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
django.setup(set_prefix=False)
File "/usr/local/lib/python3.9/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python3.9/site-packages/django/apps/registry.py", line 122, in populate
app_config.ready()
File "/usr/local/lib/python3.9/site-packages/cacheops/apps.py", line 11, in ready
install_cacheops()
File "/usr/local/lib/python3.9/site-packages/funcy/flow.py", line 258, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/cacheops/query.py", line 562, in install_cacheops
if family_has_profile(model):
File "/usr/local/lib/python3.9/site-packages/funcy/calc.py", line 62, in wrapper
value = memory[key] = func(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/cacheops/utils.py", line 34, in family_has_profile
return any(model_profile, model_family(cls))
File "/usr/local/lib/python3.9/site-packages/funcy/colls.py", line 207, in any
return _any(xmap(pred, seq))
File "/usr/local/lib/python3.9/site-packages/cacheops/conf.py", line 99, in model_profile
assert not model._meta.abstract, "This should be handled by caller"
AssertionError: This should be handled by caller
[2023-05-17 14:08:06 +0200] [8] [INFO] Worker exiting (pid: 8)
[2023-05-17 14:08:06 +0200] [7] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/funcy/calc.py", line 59, in wrapper
return memory[key]
KeyError: (<class 'entity.Record'>,)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
worker.init_process()
File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/base.py", line 134, in init_process
self.load_wsgi()
File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
self.wsgi = self.app.wsgi()
File "/usr/local/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/usr/local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
return self.load_wsgiapp()
File "/usr/local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
return util.import_app(self.app_uri)
File "/usr/local/lib/python3.9/site-packages/gunicorn/util.py", line 359, in import_app
mod = importlib.import_module(module)
File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/code/creator/wsgi.py", line 18, in <module>
application = StaticFilesHandler(get_wsgi_application())
File "/usr/local/lib/python3.9/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
django.setup(set_prefix=False)
File "/usr/local/lib/python3.9/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python3.9/site-packages/django/apps/registry.py", line 122, in populate
app_config.ready()
File "/usr/local/lib/python3.9/site-packages/cacheops/apps.py", line 11, in ready
install_cacheops()
File "/usr/local/lib/python3.9/site-packages/funcy/flow.py", line 258, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/cacheops/query.py", line 562, in install_cacheops
if family_has_profile(model):
File "/usr/local/lib/python3.9/site-packages/funcy/calc.py", line 62, in wrapper
value = memory[key] = func(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/cacheops/utils.py", line 34, in family_has_profile
return any(model_profile, model_family(cls))
File "/usr/local/lib/python3.9/site-packages/funcy/colls.py", line 207, in any
return _any(xmap(pred, seq))
File "/usr/local/lib/python3.9/site-packages/cacheops/conf.py", line 99, in model_profile
assert not model._meta.abstract, "This should be handled by caller"
AssertionError: This should be handled by caller
[2023-05-17 14:08:06 +0200] [7] [INFO] Worker exiting (pid: 7)
[2023-05-17 14:08:07 +0200] [1] [WARNING] Worker with pid 7 was terminated due to signal 15
from django-cacheops.
Second one is a dup of #449. BTW, one might not switch CACHEOPS_INSIDEOUT
on an existing cache, it needs to be dropped. It may even corrupt your cache, which will result into similar messages with any settings.
One the first one. Can you say on which particular model is it failing?
from django-cacheops.
Related Issues (20)
- Elevated and spiky request time with `CACHEOPS_INSIDEOUT` HOT 1
- in combination with django-tenant-schemas, "public" tables caching is not working HOT 1
- INSIDEOUT doesn't work with Elasticache HOT 5
- features to prevent cache stampede HOT 3
- django-cacheops not working with Django version 4 HOT 3
- Unable to disable cacheops primitives HOT 1
- Memory problem on django test init HOT 7
- DB migrations are being cached even after using setting migrations timeout to zero HOT 6
- Issue with signals (ManagerMixin._post_save() missing 1 required positional argument: 'using') HOT 3
- Question on @cached_as HOT 1
- Redis getting called too many times in a single API call. HOT 3
- Django Admin not invalidating cache on save HOT 4
- Nik
- Support for cache invalidation on `bulk_update()` method HOT 3
- AWS Elasticache Redis Serverless Implementation is raising AttributeError HOT 6
- cache wrongly set to empty list for get query (when accessing a foreignkey field) HOT 15
- conj keys always have -1 as expiration in redis 7 HOT 3
- Are we supporting model translation with django cacheops ? HOT 5
- Potential Concurrency Issue Leading to Cache Inconsistency in Multithreaded Environment HOT 6
- Delete operation fails with -OOM command not allowed when used memory > 'maxmemory'. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-cacheops.