You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Stefan Seelmann (JIRA)" <ji...@apache.org> on 2014/04/26 00:47:52 UTC

[jira] [Commented] (DIRSTUDIO-967) Timeout occurs during LDAP search

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

Stefan Seelmann commented on DIRSTUDIO-967:
-------------------------------------------

A easy fix is to call LdapNetworkConnection.setTimeOut( 0L ) in Studio when opening the connection.

In LdapNetworkConnection the "timeout" propertiy is initialized with 30 seconds. Then when a search request with no time limit (0) is started the "getTimeout(long clientTimeout)" method return the default value. I think the "getTimeout(long clientTimeout)" is not fully correct, see following matrix:

||connection timeout||client timeout (search time limit)||resulting timeout||expected timeout||
|-∞..-1|-∞..-1|Long.MAX_VALUE|(/)|
|-∞..-1|0|Long.MAX_VALUE|(/)|
|-∞..-1|1..∞|client timeout|(/)|
|0|-∞..-1|Long.MAX_VALUE|(/)|
|0|0|Long.MAX_VALUE|(/)|
|0|1..∞|client timeout|(/)|
|1..∞|-∞..-1|connection timeout (30)|(x) should be Long.MAX_VALUE|
|1..∞|0|connection timeout (30)|(x) should be Long.MAX_VALUE|
|1..∞|1..∞|min(connection timeout, client timeout)|(/)|

Any comments? Otherwise I'll try to change the method and add some tests.


> Timeout occurs during LDAP search
> ---------------------------------
>
>                 Key: DIRSTUDIO-967
>                 URL: https://issues.apache.org/jira/browse/DIRSTUDIO-967
>             Project: Directory Studio
>          Issue Type: Bug
>          Components: studio-connection
>    Affects Versions: 2.0.0-M8 (2.0.0.v20130628)
>         Environment: Windows 7 64 Bit
>            Reporter: Martin Greck-Riederer
>
> The following error occurs if a search or an exports takes a long time. 
> It is getting me every day unhappy.
> Can please investigate this and fix it?
>  - TimeOut occurred
> javax.naming.NamingException: TimeOut occurred
> 	at org.apache.directory.studio.connection.core.io.api.CursorStudioNamingEnumeration.hasMore(CursorStudioNamingEnumeration.java:247)
> 	at org.apache.directory.studio.ldapbrowser.core.jobs.SearchRunnable.searchAndUpdateModel(SearchRunnable.java:321)
> 	at org.apache.directory.studio.ldapbrowser.core.jobs.SearchRunnable.run(SearchRunnable.java:192)
> 	at org.apache.directory.studio.connection.core.jobs.StudioConnectionJob.run(StudioConnectionJob.java:109)
> 	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
> TimeOut occurred



--
This message was sent by Atlassian JIRA
(v6.2#6252)