Problem description
Hello,
I'm using RDF4J as a database backend for a web+api application written in python.
RDF4J is deployed using docker compose.
I'm using the SAIL API to create the repositories and then the SPARQL endpoint to DELETE/INSERT and ASK/SELECT/CONSTRUCT.
Most requests to the DB are ReadOnly and I'm wondering how I could have one RW instance and several RO instances, using the same filesystem.
I'm trying with this docker compose
services:
rdf4j-readwrite:
image: eclipse/rdf4j-workbench:5.2.0-tomcat
volumes:
- rdf4j_data:/var/rdf4j:rw
rdf4j-readonly:
image: eclipse/rdf4j-workbench:5.2.0-tomcat
volumes:
- rdf4j_data:/var/rdf4j:ro
- rdf4j_logs_readonly:/var/rdf4j/server/logs
deploy:
replicas: 3
volumes:
rdf4j_data:
rdf4j_logs_readonly:
I'm getting this error on the RO instance:
javax.servlet.ServletException: org.eclipse.rdf4j.repository.RepositoryLockedException: SAIL is already locked by: 1@5c8cc1fa0d60 in /var/rdf4j/workbench/queries
org.eclipse.rdf4j.workbench.commands.QueryServlet.init(QueryServlet.java:127)
org.eclipse.rdf4j.workbench.proxy.ProxyRepositoryServlet.createServlet(ProxyRepositoryServlet.java:127)
org.eclipse.rdf4j.workbench.proxy.ProxyRepositoryServlet.init(ProxyRepositoryServlet.java:55)
org.eclipse.rdf4j.workbench.proxy.WorkbenchServlet.service(WorkbenchServlet.java:230)
org.eclipse.rdf4j.workbench.proxy.WorkbenchServlet.handleRequest(WorkbenchServlet.java:136)
org.eclipse.rdf4j.workbench.proxy.WorkbenchServlet.service(WorkbenchServlet.java:111)
org.eclipse.rdf4j.workbench.proxy.WorkbenchGateway.service(WorkbenchGateway.java:119)
org.eclipse.rdf4j.workbench.base.AbstractServlet.service(AbstractServlet.java:129)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:115)
org.eclipse.rdf4j.workbench.proxy.CacheFilter.doFilter(CacheFilter.java:64)
org.eclipse.rdf4j.workbench.proxy.CookieCacheControlFilter.doFilter(CookieCacheControlFilter.java:56)
Is this scenario is at all supported by RDF4J ?
Best regards,
Pierre
Preferred solution
A tutorial for one RW and several RO instances on the same host, sharing the filesystem where data is stored.
Are you interested in contributing a solution yourself?
I don't have much JAVA experience, but I can test deployment variation.
Alternatives you've considered
No response
Anything else?
No response
Problem description
Hello,
I'm using RDF4J as a database backend for a web+api application written in python.
RDF4J is deployed using docker compose.
I'm using the SAIL API to create the repositories and then the SPARQL endpoint to DELETE/INSERT and ASK/SELECT/CONSTRUCT.
Most requests to the DB are ReadOnly and I'm wondering how I could have one RW instance and several RO instances, using the same filesystem.
I'm trying with this docker compose
I'm getting this error on the RO instance:
Is this scenario is at all supported by RDF4J ?
Best regards,
Pierre
Preferred solution
A tutorial for one RW and several RO instances on the same host, sharing the filesystem where data is stored.
Are you interested in contributing a solution yourself?
I don't have much JAVA experience, but I can test deployment variation.
Alternatives you've considered
No response
Anything else?
No response