You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Shashank Gupta (JIRA)" <ji...@apache.org> on 2015/05/02 07:01:07 UTC

[jira] [Commented] (JCR-3875) S3 data store: maxConnections <= writeThreads leads to exception

    [ https://issues.apache.org/jira/browse/JCR-3875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14524941#comment-14524941 ] 

Shashank Gupta commented on JCR-3875:
-------------------------------------

[~alexander.klimetschek] {{maxConnections }} is max number of connections used in S3 connector. out of max connections {{writeThreads}} will be used by write and rest for other operations. It is not appropriate for {{writeThreads}} => {{maxConnections }}  as threads would be idle without connection. The code is implemented this logic. Lowering priority as it is configuration issue.

> S3 data store: maxConnections <= writeThreads leads to exception
> ----------------------------------------------------------------
>
>                 Key: JCR-3875
>                 URL: https://issues.apache.org/jira/browse/JCR-3875
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-data
>            Reporter: Alexander Klimetschek
>            Priority: Critical
>
> The S3 data store [tries to create a thread pool|https://github.com/apache/jackrabbit/blob/a9e005191a63078abdcaeace50887f79c79415cb/jackrabbit-aws-ext/src/main/java/org/apache/jackrabbit/aws/ext/ds/S3Backend.java#L170-L171] with
> {{maxConnections - writeThreads}}
> but this will fail if you specify the same value for both or less maxConnections than writeThreads, and throw:
> {noformat}
> Caused by: org.apache.jackrabbit.core.data.DataStoreException: Could not initialize S3 from {s3Encryption=SSE_S3, component.name=org.apache.jackrabbit.oak.plugins.blob.datastore.S3DataStore, maxConnections=40, secretKey=XXXXXXX, writeThreads=40, service.vendor=The Apache Software Foundation, s3Bucket=XXXXX, socketTimeout=120000, service.pid=org.apache.jackrabbit.oak.plugins.blob.datastore.S3DataStore, component.id=79, connectionTimeout=120000, accessKey=XXXXXXX, s3EndPoint=s3.amazonaws.com, s3Region=us-standard, maxErrorRetry=10, path=./crx-quickstart/repository/datastore}
> 	at org.apache.jackrabbit.aws.ext.ds.S3Backend.init(S3Backend.java:188)
> 	at org.apache.jackrabbit.aws.ext.ds.S3Backend.init(S3Backend.java:121)
> 	at org.apache.jackrabbit.core.data.CachingDataStore.init(CachingDataStore.java:267)
> 	... 23 common frames omitted
> Caused by: java.lang.IllegalArgumentException: null
> 	at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1310)
> 	at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1233)
> 	at java.util.concurrent.Executors.newFixedThreadPool(Executors.java:114)
> 	at org.apache.jackrabbit.aws.ext.ds.S3Backend.init(S3Backend.java:174)
> 	... 25 common frames omitted
> {noformat}
> It's also not intuitive at all. Maybe it's better to specify the thread pools explicitly, i.e. {{writeThreads}} and {{otherThreads}} (whatever that 2nd pool exactly is).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)