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

Can a persistent cache file be shared by various instances? #95

Closed
hvelarde opened this issue Aug 30, 2017 · 3 comments
Closed

Can a persistent cache file be shared by various instances? #95

hvelarde opened this issue Aug 30, 2017 · 3 comments

Comments

@hvelarde
Copy link

I was trying to set only one persistent cache file among 2 instances but I got a lot of LogError exceptions when I tried to start the second one.

I just want to know if this is possible or not:

2017-08-30T19:28:50 ERROR zc.lockfile Error locking file /tmp/zeoclient-1.zec.lock; pid=10889
Traceback (most recent call last):
  File "/opt/plone/buildout/eggs/zc.lockfile-1.0.2-py2.7.egg/zc/lockfile/__init__.py", line 84, in __init__
    _lock_file(fp)
  File "/opt/plone/buildout/eggs/zc.lockfile-1.0.2-py2.7.egg/zc/lockfile/__init__.py", line 59, in _lock_file
    raise LockError("Couldn't lock %r" % file.name)
LockError: Couldn't lock '/tmp/zeoclient-1.zec.lock'
@jimfulton
Copy link
Member

Nope. A ZEO client cache can only be used by a single process at a time.

@jamadden
Copy link
Member

FWIW, RelStorage supports a cache-local-dir option that allows multiple instances to share the same cache directory. It's far from perfect (see zopefoundation/ZODB#163 for one), but it may be helpful to some.

@hvelarde
Copy link
Author

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants