MVSP timeout

150 views
Skip to first unread message

Rick Weiser

unread,
Nov 22, 2016, 3:34:27 PM11/22/16
to Pick and MultiValue Databases
Hi all,

Does anyone know if there is an inactivity timeout on an MVSP connection?  If there is, is it configurable?

Thanks,

Rick

Wols Lists

unread,
Nov 24, 2016, 11:59:15 AM11/24/16
to mvd...@googlegroups.com
Microsoft Valued Software Professional? - probably about 8 hours, after
that you know they've fallen asleep :-)

> Thanks,
>
> Rick
>
Cheers,
Wol

geneb

unread,
Nov 24, 2016, 11:23:53 PM11/24/16
to mvd...@googlegroups.com
On Thu, 24 Nov 2016, Wols Lists wrote:

> On 22/11/16 20:34, Rick Weiser wrote:
>> Hi all,
>>
>> Does anyone know if there is an inactivity timeout on an MVSP
>> connection? If there is, is it configurable?
>>
> Microsoft Valued Software Professional? - probably about 8 hours, after
> that you know they've fallen asleep :-)
>
No, it's the connectivity interface between Java & .net applications and
D3. (and I'd like to know about any timeout values too!)

g.

--
Proud owner of F-15C 80-0007
http://www.f15sim.com - The only one of its kind.
http://www.diy-cockpits.org/coll - Go Collimated or Go Home.
Some people collect things for a hobby. Geeks collect hobbies.

ScarletDME - The red hot Data Management Environment
A Multi-Value database for the masses, not the classes.
http://scarlet.deltasoft.com - Get it _today_!

stope19

unread,
Nov 25, 2016, 12:21:19 AM11/25/16
to Pick and MultiValue Databases
A quick google shows a code example at:


around line 53 you can see a timeout being set on a connection. This page is rather old (2013) - so maybe this is all 'way out of date' ?

May/may-not help..

geneb

unread,
Nov 25, 2016, 2:20:15 PM11/25/16
to Pick and MultiValue Databases
On Thu, 24 Nov 2016, stope19 wrote:

> A quick google shows a code example at:
>
> https://github.com/asharif/mv-session-mgr/blob/master/src/main/java/org/orphanware/mv/sessionmgr/MVConnection.java
>
> around line 53 you can see a timeout being set on a connection. This page
> is rather old (2013) - so maybe this is all 'way out of date' ?
>
> May/may-not help..
>
I suspect that's got to do with timing out on attempting to open the
connection.

When you open an MVSP connection, you specify the user, account, password,
and port to connect to. I don't see any of that there.

Nathan Rector

unread,
Nov 28, 2016, 10:35:32 AM11/28/16
to mvd...@googlegroups.com
This is a really ugly .NET hack, but it allows you create a Timeout for
any method or function. I would look at this Stackoverflow article for
more information:

http://stackoverflow.com/questions/299198/implement-c-sharp-generic-timeout

I choose to use the WaitFor(Of TResult) class included in the article,
and here:

https://github.com/michaelsutton/coded-ui-dubugging/blob/master/Timeout/WaitFor.cs

There are pitfalls, but I was willing to live with them:

Try
_Connection = New TIGR.MVSP.Pick()
_Connection.errorMsgBox = False
_Connection.ConnectionTimeout = 15

'If _Connection.Connect(_HostName, _HostPort, "MVSP", String.Empty) Then
If WaitFor(Of Boolean).FunctionWithTimeout(New Func(Of
Boolean)(Function()
Return _Connection.Connect(_HostName, _HostPort, "MVSP", String.Empty)
End Function), TimeSpan.FromSeconds(30).TotalMilliseconds) Then
' Successful
End If
Catch ex As TimeoutException
ApplicationLog.LogError("mvBaseDatabase::DoConnect", ex)

' Destroy the connection class
_Connection = Nothing
End try

Because the WaitFor class will push the .Connect to another thread to
process the command, it will be up to you to apply any SyncLocks and
address any other threading issues that may come up. I have not seen
the threading issues that were talked about in that StackOverflow
article by using this, but that doesn't mean it's not there.

The things I found when working with MVSP connectionTimeout is that
timeout is for the TCPIP connection to port, but once the port has been
connected too and MVSP starts sending data to do the account logon, the
timeout is no longer valid.

Side Note: Also, keep in mind that Reverse-DNS lookups can also cause a
delay when connecting.

So if the port MVSP is connecting to is in an invalid state, or not
accepting data for some reason, it will wait forever (or atleast a very
long time) and not timeout.



-Nathan

On 11/24/2016 9:23 PM, geneb wrote:
> On Thu, 24 Nov 2016, Wols Lists wrote:
>
>> On 22/11/16 20:34, Rick Weiser wrote:
>>> Hi all,
>>>
>>> Does anyone know if there is an inactivity timeout on an MVSP
>>> connection? If there is, is it configurable?
>>>
>> Microsoft Valued Software Professional? - probably about 8 hours, after
>> that you know they've fallen asleep :-)
>>
> No, it's the connectivity interface between Java & .net applications and
> D3. (and I'd like to know about any timeout values too!)
>
> g.
>

--

--------------------------------------------
Nathan Rector
International Spectrum, Inc
http://www.intl-spectrum.com
Phone: 720-259-1356

Conference Dates: April 11th-14th
http://www.intl-spectrum.com/conference/

Magazine: Jan/Feb 2016
- Business Tech: The Point (of Sale)
- OAUTH 2 Login with MultiValue BASIC . Part 3
- /bin/bash-ing MultiValue
- Building a Modern Line-Of-Business Application — Part 1
http://www.intl-spectrum.com/Magazine/

geneb

unread,
Nov 28, 2016, 11:20:28 AM11/28/16
to mvd...@googlegroups.com
On Mon, 28 Nov 2016, Nathan Rector wrote:

> This is a really ugly .NET hack, but it allows you create a Timeout for any
> method or function. I would look at this Stackoverflow article for more
> information:
>
Nathan, what you and the others appear to be missing is that the OP (any
myself) are looking for an /inactivity/ timer, not a connection timer.

>
> On 11/24/2016 9:23 PM, geneb wrote:
>> On Thu, 24 Nov 2016, Wols Lists wrote:
>>
>>> On 22/11/16 20:34, Rick Weiser wrote:
>>>> Hi all,
>>>>
>>>> Does anyone know if there is an inactivity timeout on an MVSP
^^^^^^^^^^^^^^^^^^

Nathan Rector

unread,
Nov 28, 2016, 11:42:46 AM11/28/16
to mvd...@googlegroups.com
Oh, I've always had to create Inactivity/Idle timeouts using proxy
classes and/or separate database server thread.

I'm a bit partial to using a separate database server thread since I can
then turn the call to the database into an Async Begin/End style call,
or IAsyncResult Callback style call, and not block the UI.

Works well in anything but UWP applications. In those apps you would
need to change it to a Background Task which I haven't completed convert
my code into yet.

-Nathan

On 11/28/2016 9:20 AM, geneb wrote:
> On Mon, 28 Nov 2016, Nathan Rector wrote:
>
>> This is a really ugly .NET hack, but it allows you create a Timeout
>> for any method or function. I would look at this Stackoverflow
>> article for more information:
>>
> Nathan, what you and the others appear to be missing is that the OP (any
> myself) are looking for an /inactivity/ timer, not a connection timer.
>
>>
>> On 11/24/2016 9:23 PM, geneb wrote:
>>> On Thu, 24 Nov 2016, Wols Lists wrote:
>>>
>>>> On 22/11/16 20:34, Rick Weiser wrote:
>>>>> Hi all,
>>>>>
>>>>> Does anyone know if there is an inactivity timeout on an MVSP
> ^^^^^^^^^^^^^^^^^^
>
> g.
>

--

Reply all
Reply to author
Forward
0 new messages