directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Seelmann (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (DIRSTUDIO-967) Timeout occurs during LDAP search
Date Fri, 25 Apr 2014 22:57:15 GMT

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

Stefan Seelmann edited comment on DIRSTUDIO-967 at 4/25/14 10:57 PM:
---------------------------------------------------------------------

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)|(x) client timeout|

After thinking a bit longer, I wonder if client timeout (the search time limit specified in
the search request) should always override the connection timeout?

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



was (Author: seelmann):
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)

Mime
View raw message