connection pool using sesame api?

1 view
Skip to first unread message

joost....@gmail.com

unread,
Apr 7, 2014, 8:56:11 AM4/7/14
to sta...@clarkparsia.com
I can't seem to find the way to setup a connection pool when using the sesame api. What am I missing?

Cheers,
J

Mike Grove

unread,
Apr 7, 2014, 9:31:15 AM4/7/14
to stardog
One is created internally for StardogRepository using the following setup:

ConnectionPoolConfig aConfig = ConnectionPoolConfig
.using(theConfig)
.minPool(5)
.maxPool(1000)
.expiration(1, TimeUnit.HOURS)
.growAtCapacity();

There is no way currently to pass in your own pool configuration.

Cheers,

Mike



--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

joost....@gmail.com

unread,
Apr 8, 2014, 2:49:15 AM4/8/14
to sta...@clarkparsia.com
Thank you. I didn't quite get that from the docs.

How do I use this connectionpoolconfig from Sesame though? I can't wrap it in the StardogRepository constructor....

Mike Grove

unread,
Apr 8, 2014, 6:18:57 AM4/8/14
to stardog
On Tue, Apr 8, 2014 at 2:49 AM, <joost....@gmail.com> wrote:
Thank you. I didn't quite get that from the docs.

How do I use this connectionpoolconfig from Sesame though? I can't wrap it in the StardogRepository constructor....

Yes, that is what I meant when I said there is no way to pass in your own pool configuration.

The pool configuration used internally for StardogRepository is sufficient for most use cases.  We will consider allowing it to be tweaked in future versions of Stardog.

Cheers,

Mike 

joost....@gmail.com

unread,
Apr 9, 2014, 3:41:51 AM4/9/14
to sta...@clarkparsia.com
Ah. Ok.
Well, for us right now it's sufficient to know that connections are being pooled. And that it should suffice for most use cases. Thank you.

What kind of nr of concurrent connections is the triple store configured for btw?

Mike Grove

unread,
Apr 9, 2014, 7:21:09 AM4/9/14
to stardog
On Wed, Apr 9, 2014 at 3:41 AM, <joost....@gmail.com> wrote:
Ah. Ok.
Well, for us right now it's sufficient to know that connections are being pooled. And that it should suffice for most use cases. Thank you.

What kind of nr of concurrent connections is the triple store configured for btw?

There's nothing specific in Stardog about this.  We use Netty as the basis for the Stardog server which performs quite well.  Incoming requests are handled each in a thread, so more cores will let you handle higher loads.

Cheers,

Mike 

joost....@gmail.com

unread,
Apr 9, 2014, 9:17:20 AM4/9/14
to sta...@clarkparsia.com
I wrote something else than I meant.

I meant: what kind of nr of concurrent connections is the sesame client configured for?

Mike Grove

unread,
Apr 9, 2014, 9:24:10 AM4/9/14
to stardog
On Wed, Apr 9, 2014 at 9:17 AM, <joost....@gmail.com> wrote:
I wrote something else than I meant.

I meant: what kind of nr of concurrent connections is the sesame client configured for?

The Sesame bindings are a thin adapter layer over our core API, SNARL.  For example, the RepositoryConnection you get back from StardogRepository is just a wrapper around a SNARL Connection.  Those Connection's are doled out from the internal pool I described from within StardogRepository, which will to the capacity required.

Cheers,

Mike

Joost de Vries

unread,
Apr 29, 2014, 10:09:34 AM4/29/14
to sta...@clarkparsia.com
Hi Mike,

We're experiencing a problem with memory leaks on our server. And we're wondering whethers we're using the sesame connection api correctly.
As it is we're closing the sesame repository connection every time.

Is that the proper way to deal with sesame connections and the underlying connectionpool?
I.e. is a close() on the sesame connection translated to a release() on the underlying snarl connection?

Thanks in advance.

Mike Grove

unread,
Apr 29, 2014, 10:34:59 AM4/29/14
to stardog
On Tue, Apr 29, 2014 at 10:09 AM, Joost de Vries <joost....@gmail.com> wrote:
Hi Mike,

We're experiencing a problem with memory leaks on our server. And we're wondering whethers we're using the sesame connection api correctly.
As it is we're closing the sesame repository connection every time.

Is that the proper way to deal with sesame connections and the underlying connectionpool?

Yes, you should always close open connections.
 
I.e. is a close() on the sesame connection translated to a release() on the underlying snarl connection?

Yes.

Cheers,

Mike

Joost de Vries

unread,
May 2, 2014, 6:47:37 AM5/2/14
to sta...@clarkparsia.com
Tx Mike
Reply all
Reply to author
Forward
0 new messages